Please provide the following details too when asking for help in this category:
I am confused. When I get authenticated and a wallet created for me at the point of logging in. How do I interact with the solana wallet in other pages of my DApp?
I mean like getting the user’s balance, signing transactions, etc on a different page from the login page.
Or do I have to initialize web3 and connect again on every page of my application whenever I want to access the solana wallet?
SDK Version:
Platform:
Browser Console Screenshots:
Related to Custom Authentication? Please provide the following info too: (Optional)
Verifier Name:
JWKS Endpoint:
Sample idToken(JWT)
Please provide the Web3Auth initialization and login code snippet below:
So, let me buttress my point to make it clearer. Using Next.js, I am building a DApp with 5 pages for authenticated users. When a user signs in with web3auth, this is being handled on the login page. Already on the login page, a connection have been established and I can interact the chain but on other pages, I can’t. On the app, there is a page/tab for wallets where users should be able to interact with the blockchain but there is no way to access the provider/chain. So, I would like to get clarifications if there’s anyway to interact with the chain on other pages of my DApp after users have been authenticated.
These can be a nice reference for your need. Basically you need to do state management (using app level state) of the provider returned by Web3Auth to make it work across pages.