Vanillajs plug& play does not work

I am trying Plug & play, Web Modal SDK with Vanilla JS

I tried following

Also tried checking

  1. If I run it on my pc (withot npm) I get problem with ClientID
  • In flutter or in React my ClientID works perfectly
  1. Running example also does not work. THere is some crash in generating some sha256 key (saw in console)

I want to integrate this Plug & play in Wix but I see it is not working. React example works but haven’t yet had time to try that using Wix

What to do?

Hey @djelastic
Welcome aboard. Can you please share the exact error that you’re getting on the console?
Can you please share the Web3Auth initialisation snippet?

Hey @maharshi

So it says that

Something went wrong

There seems to be some bug in the code. Please contact support to fix this.
could not validate redirect, please whitelist your domain: for provided clientId {myId} at https://dashboard.web3auth.io. Also, this project is on sapphire_devnet network. Please ensure the the used Client ID belongs to this network.

I have done this multiple times. I have correct Client ID and everything
I did same on react, flutter and it worked normally.

Only vanilla Js shows this problem
Went over tutorials

  1. When I tried example on your github it also breaks. As said it shows some generating sha256 key function error

You can try it yourself. Does not work neither of those and only vanilla has problems

@djelastic,

I’ll check the examples and fix those, can you please share the link of the example you tried? Thanks for reporting this. In the meantime, could you please share the initialization code snippet with me here?

@maharshi great!

So first I tried this

And here I get this ClientId problem

Then I tried this github example

But here another error gets presented, in some library from your side

@djelastic,

Could you please share a screenshot of the ClientId problem and any other error you are encountering from our library?
Did you try out the preview in the quick start, do you face the similar ClientId problem?
Screen Recording 2024-07-19 at 10.23.04.mov [video-to-gif output image]

@maharshi
If I try this example it works yes
But when I copy and download this on my pc, change to sapphire_devnet and change clientid it does not work

Here I posted a video

And as I said, Flutter and React work perfectly. Same ClientId can be used and same all callback URLs without any problem