When asking for help in this category, please make sure to provide the following details:
- SDK Version:^8.1.1
- Platform: Web
- Browser Console Screenshots:
- If the issue is related to Custom Authentication, please include the following information (optional):
- Verifier Name: staging-axr-wallet
- JWKS Endpoint: https://api-staging.axirwallet.com/.well-known/jwks.json
- Sample idToken (JWT): eyJ0eXAiOiJqd3QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjhWclhWcVRRbG1uX084X3g5Y2d4NVY0RElsNmR3TXlqYVA1REN4Q2JOcnMifQ.eyJzdWIiOiI2NTYiLCJuYW1lIjoiYWJoaXNoZWtzYWd1KzEwNiIsImVtYWlsIjoiYWJoaXNoZWtzYWd1KzEwNkBnbWFpbC5jb20iLCJwaG9uZU51bWJlciI6Iis5MTk5NzE1MTI5MzkiLCJleHAiOjE3MzE1NjQ1NTMsImlhdCI6MTczMTQ3ODE1MywiaXNzIjoiaHR0cHM6Ly9hcGktc3RhZ2luZy5heGlyd2FsbGV0LmNvbSIsImF1ZCI6ImF4ci13YWxsZXQifQ.i4dOhTuJGe4DXC_6YX09oZ7XB6yj2PXLqqrpQLKpIKWWWoeSnE6Zv6384SvdG-OzoAgy_GHz1yQ4Xs4Wsm75ZKYGGzmqrwVRuK-J8WkuzVyOEzJ4VipVSfNW5XHSSxGNBKu-qE4Vgv0zS2EQBxcP0-XAVlMEdCr-VFNvP_v_XuYWrhX82C7o3rLHuCXEayyx6f2azT8P_g7E4efxqcg3k3Y59poyOZVod0hSrO0FDFeoANLmMXWUmKqPANOTMbIBVKtAEysVeWA_-QwFGjg7GbUSF4lPDg_tV50xKHmICACk4mVpqPNk12774t8m5yuBXwvRp56-yzrUNh5wLzG17g
web3Auth is initialized like this
const chainConfig = {
chainId: “0x1”,
displayName: “Ethereum Mainnet”,
chainNamespace: CHAIN_NAMESPACES.EIP155,
tickerName: “Ethereum”,
ticker: “ETH”,
decimals: 18,
rpcTarget: “https://rpc.ankr.com/eth”,
blockExplorerUrl: “https://etherscan.io”,
};
const privateKeyProvider = new EthereumPrivateKeyProvider({
config: { chainConfig },
});
const web3authSfa = new Web3Auth({
clientId,
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_DEVNET,
usePnPKey: false,
privateKeyProvider,
});
await web3authSfa.init();
web3AuthSfa is used like this
try {
if (!web3authSfa) {
console.log(“Web3Auth Single Factor Auth SDK not initialized yet”);
return;
}
const isConnected = await web3authSfa.status;
let telegramGeneratedPrivateKey;
if (isConnected.toLowerCase() === 'connected') {
telegramGeneratedPrivateKey = await web3authSfa.torusPrivKey;
} else {
await web3authSfa.connect({
loginMethod:'jwt',
verifier,
verifierId: verifierId,
idToken: authToken,
});
console.log("**@ web3AuthSfa connected ");
telegramGeneratedPrivateKey = await web3authSfa.torusPrivKey;
}
NOTE:- I have checked that i am passing different JWT each time but still facing this error , i checked that the jwt itself has changed and the decoded iat and exp timestamp also changed , so how can i fix this issue.