Hello!
I’m using web3auth with JWT and it’s working fine.
What I’m looking for is a way to send the authenticate with JWT without the need of redirecting or opening any new tab, and make it all done silently on the client side.
is that possible?
here is my current code:
const privateKeyProvider = new EthereumPrivateKeyProvider({
config: { chainConfig },
});
const web3auth = new Web3AuthNoModal({
clientId: process.env.REACT_APP_WEB3AUTH_CLIENT_ID as string,
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_DEVNET,
privateKeyProvider,
});
const openloginAdapter = new OpenloginAdapter({
adapterSettings: {
uxMode: UX_MODE.REDIRECT,
loginConfig: {
jwt: {
verifier: process.env.REACT_APP_WEB3AUTH_JWT_VERIFIER as string,
typeOfLogin: "jwt",
clientId: process.env.REACT_APP_WEB3AUTH_CLIENT_ID as string,
},
},
},
});
web3auth.configureAdapter(openloginAdapter);
setWeb3auth(web3auth);
await web3auth.init();
setProvider(web3auth.provider);
if (web3auth.connected) {
setWeb3authLoggedIn(true);
}