Hello,
I have been encountering the same error for hours and I can’t find a solution.
I use NextJs framework, when I initialize web3auth, I get a 404 error (invalid public key) from torus.
I have created several verifiers but nothing changes, even when I put verifier names that do not exist. I have changed several times from version 5.1 → 4.6. I have enabled popups and redirects but nothing works.
When I try to connect via the popup it remains white and nothing happens. I use webpack 5 but it seems that there is no fix with NestJs.
Thanks you
const web3auth = new Web3AuthNoModal({
clientId,
chainConfig: {
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: '0x1', // EVM chain's Chain ID
rpcTarget: 'https://rpc.ankr.com/eth', // EVM chain's RPC endpoint
// Avoid using public rpcTarget in production.
// Use services like Infura, Quicknode, Alchemy, Ankr etc.
displayName: 'Ethereum Mainnet', // EVM chain's Name
blockExplorer: 'https://etherscan.io/', // EVM chain's Blockexplorer
ticker: 'ETH', // EVM chain's Ticker
tickerName: 'Ethereum', // EVM chain's Ticker Name
},
});
const openloginAdapter = new OpenloginAdapter({
adapterSettings: {
network: 'testnet',
uxMode: 'popup', // also support popup
loginConfig: {
jwt: {
name: 'Bifrost Web3Auth',
verifier: 'bifrost-web3auth-demo',
typeOfLogin: 'jwt',
},
},
},
});
web3auth.configureAdapter(openloginAdapter);
await web3auth.init();
await web3auth.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
loginProvider: 'jwt',
extraLoginOptions: {
id_token: access_token,
verifierIdField: 'sub',
},
});
access_token come from my custom JWT auth, I used jwonwebtoken nodejs package to sign it, here is an example token signed with my private key. When I check the jwt with my JWK, signature is verified.
It’s really problematic, I have to make a presentation in my company of this solution in 3 hours but if I can’t do it I will have to present MagicLink instead
Do I need to name my kid with 1bb9605c36e{your_kid}69386830202b2d ?
for example if in my token kid is test do I need to name kid 1bb9605c36etest69386830202b2d in the jwks ?
Also, in my JWK n and e don’t start with 0x, do I need to convert my current value ?
Here is a sample : eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IndlYjNhdXRoIn0.eyJzdWIiOiJmMzVmM2UzNS1lZWIwLTQ1N2UtYjUyMC00YzRhMGUzMzQ2N2IiLCJ0eXBlIjoicmVmcmVzaCIsImlhdCI6MTY4MjM3NTAwMywiZXhwIjoxNzEzOTExMDAzLCJhdWQiOiJiaWZyb3N0LXdlYjNhdXRoIn0.V1DJW_uJb4-2H5ltUQvWvANgNEWgiUPch9uYQalqq79cgL5TFcE_wDIkaIf9TxfujTlHKBzoF4pChBYhONUnVdQau5tGwRDg6SJjlhM3NiY7cRxY53EjY8K4TaqxcSvAR7pjhNMCpOTYyjeUQ3tem6i7MTivDWn5L9f3VbrU1zbSuUxCLZzpWN1XljlFPz3g6vsdVU38xwM4FKyBOhvH_6FeIs2RPdnHLI8H0ypEWCXVu_HhlH1Ow1LWKPYqU__9MdQaq4w9i-Ljivc3xC-K3DklYeoGbbI5lz6EU5XTT68DjV-xb_N7QxJp5vMu8cdRyTqVN0VhkQvtvE3SbTPVpVv-rYBnnbKF723GGVot67_th6TWOBS30oOaCCX2vBNfELUWkBJmB7rEzfn_Iu3_0_v4pw7Dw6WsFkX0g_TIES4falRZrkwDOZhBZasMipW3JTdLSk5tLNelKWoXbfESw0m3e6aVHaqDglo48tVbDwLV_3mzxrbGF-5tKYJ9muvuZUwLKh5Q97qAfNesGv0yrdJCPeNGAmpUSG09VBenkpqjd6ZQjLTt0hEwz6grfzwYUdsq-8l05LjyXj_K3bVVOc_JqbEqfjnFon8hUKWkAT82aKdFn7-MMb9JdG5BJxbfnrOyGL9g4t-eQgwnSi5xNOzlsxn4UcVe2GCD_rxvwo4