Archived Content from Web3Auth Community
This topic was originally posted by githubdiscussions on 11/7/2022.
This content has been migrated from our previous community forum to preserve valuable discussions.
Hello,
Is there a way to login/show the torus wallet once the user is logged with web3auth? I am using firebase custom auth with web3auth. I am able to login users and get their user info (address, private key etc) but I am not able to log them into Torus wallet or any of the wallet UI provided by web3auth/torus. Is there any way?
Here is what I have tried but failed so far:
`
const userInfo = await web3auth.getUserInfo();
const privateKey: string = await web3auth.provider.request({
method: "eth_private_key"
});
const torus = new Torus();
await torus.init({
buildEnv: 'testing',
enableLogging: false,
showTorusButton: false,
network: {
host: 'mumbai',
chainId: 80001,
networkName: 'Polygon Mumbai'
}
});
await torus.loginWithPrivateKey({ privateKey, userInfo });
await torus.showWallet("home");`
The error I am getting is PreferencesController.js:389 unable to fetch etherscan tx Response {type: 'cors', url: 'https://api.tor.us/etherscan?selectedAddress=0x8fcā¦18816d374462090a416ab216b&selectedNetwork=mainnet
Originally posted by: seakkus
Check the discussion at: https://github.com/orgs/Web3Auth/discussions/829