Please provide the following details too when asking for help in this category:
-
SDK Version: 11.0.5
-
Platform: torus.js
-
Browser Console Screenshots:
error acmecore-iss not found for account id: 5Do4YYXAGSvZ1thcxuEqgGMq26khBHm8VaVcS8hoW8zed5BW -
Related to Custom Authentication? Please provide the following info too: (Optional)
- Verifier Name: acmecore-iss
- JWKS Endpoint: https://stg-acme.us.auth0.com/.well-known/jwks.json
- Sample idToken(JWT): eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ikg5QWdjTnRGWGJWejBsZGQ2RXRQTSJ9.eyJnaXZlbl9uYW1lIjoiTHVjYXMiLCJmYW1pbHlfbmFtZSI6IjAiLCJuaWNrbmFtZSI6Imx1Y2FzLjB4MDAwIiwibmFtZSI6Ikx1Y2FzIDAiLCJwaWN0dXJlIjoiaHR0cHM6Ly9saDMuZ29vZ2xldXNlcmNvbnRlbnQuY29tL2EvQUNnOG9jSVFiQXJfeWc1MlB5UGFJZmxPYjBoTnVaNkgxZXJvc190aHhadm9uN1V5PXM5Ni1jIiwibG9jYWxlIjoiZW4iLCJ1cGRhdGVkX2F0IjoiMjAyMy0xMC0xM1QwODoxOTowOC44MjdaIiwiZW1haWwiOiJsdWNhcy4weDAwMEBnbWFpbC5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6Ly9zdGctYWNtZS51cy5hdXRoMC5jb20vIiwiYXVkIjoidENvTnNsSVZVcDUya1N6V2VyZGp6dUtIZ3ZMbEJ5ZlkiLCJpYXQiOjE2OTcxODUxNTAsImV4cCI6MTY5NzIyMTE1MCwic3ViIjoiZ29vZ2xlLW9hdXRoMnwxMTQzODMxMDg1MDIxNDkzNTExOTAiLCJzaWQiOiJDMWVpQzcxVkxHc0NPZjZ4RGx1aGpwaTdvZjJSaXdJVSIsIm5vbmNlIjoiT0VNMFMwMTFVbms1TVcxc1lpMHdSRmRtZW1SbGJVZFhWRFpXTjA1cFFuWTNPVEJHTUhOUmFISnhMUT09In0.PesjSAHLpxz9L_a_3wtpB5BxYGw02wLQDlnMlsQ4k-nMOchtUjUCLl_Y6dFsvtY9G6R1xWOIceD-embr5NnX983_4ePVvfEitwHOFMZAhMuWLluR89XcpaxO4xcp5BAylXtGCVQTZwUlBtDOnD3Fn1BUQCuFlEh28JsvISJXsmcjLChWgm_cEoW0n0wCKRxswkJvrtNTaF3EW9_Rv4qJT3-bDZwFaqLiZ70GOA_8ufZeUWI4hrwUC8bGqVEmi4b-VtGvcOX_q0XIC4LNljm1kS4x4SLwJ4dIR7_l6Yy44dEcqidiX7W9CEihbEbF2BIYAg2Xzut8xuv2OQTRhZ0HDg
Please provide the Web3Auth initialization and login code snippet below:
onst Torus = new TorusUtils({
allowHost: “https://signer-polygon.tor.us/api/allow”,
clientId: web3auth_client_id,
enableOneKey: true,
// @ts-ignore
network: {
development: “sapphire_devnet”,
production: “sapphire_mainnet”,
staging: “sapphire_devnet”,
}[environment],
});
const {
torusNodeEndpoints: torus_node_endpoints,
torusIndexes: torus_indexes,
} = await new FetchNodeDetails().getNodeDetails({
verifier: web3auth_verifier_name,
verifierId: jwt_verifier_id,
});
// TODO: add support for non EVM chains
// Get the EVM chain details
const {
data: chain_details,
} = await axios.get(/assets/evm-chains/${Store.transaction_summary!.chain_id}.json);
// Initialise Ethereum provider
const EthereumProvider = new EthereumPrivateKeyProvider({
config: {
chainConfig: {
blockExplorer: chain_details.explorer.url,
chainId: toHex(parseInt(${Store.transaction_summary!.chain_id}, 10)),
displayName: chain_details.name,
rpcTarget: Store.transaction_summary!.chain_rpc,
ticker: chain_details.native_currency.symbol,
tickerName: chain_details.native_currency.name,
},
},
});
const private_key = subkey(
await Torus.retrieveShares(
torus_node_endpoints,
torus_indexes,
web3auth_verifier_name,
{
verifier_id: jwt_verifier_id,
},
jwt,
)
.then(key_details => key_details.finalKeyData.privKey!.padStart(64, “0”)),
Buffer.from(web3auth_client_id, “base64”),
).padStart(64, “0”);
await EthereumProvider.setupProvider(private_key);
// Initialise web3
// @ts-ignore
const ethers = new Ethers.providers.Web3Provider(EthereumProvider.provider!);
const signer = new Ethers.Wallet(private_key);