Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login into Torus wallet with web3auth (+firebase) #500

Open
seakkus opened this issue Nov 7, 2022 · 0 comments
Open

Login into Torus wallet with web3auth (+firebase) #500

seakkus opened this issue Nov 7, 2022 · 0 comments

Comments

@seakkus
Copy link

seakkus commented Nov 7, 2022

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 log users in 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant