Hi Zhe Wang! Thank you for reaching out with your issue.
I see you’re facing a problem with logging in via the Phantom wallet using the Web3Auth SDK. Here’s a summary of the details you provided for our support team:
Issue Report:
SDK Details: Help - Plug n Play
SDK Version Numbers:
@web3auth/base: ^8.12.4
@web3auth/modal: ^8.12.4
@web3auth/phantom-adapter: ^8.12.4
@web3auth/solana-provider: ^8.12.4
Platform: Not specified (please provide this if applicable).
Problem Description:
Users can log in via Google/Twitter but encounter issues with Phantom wallet.
After clicking the connect button in the Phantom wallet, a success message appears in the Web3Auth Modal, but the website isn’t re-rendering, and the if (web3auth.connected) code isn’t triggered.
Code Snippet:
You’ve shared a snippet that shows your initialization process.
Screenshot:
Proposed Solution:
Since it seems like the connection is successful but not triggering a re-render, I recommend checking two things:
Ensure that the state management around web3auth.connected is set up correctly to trigger a re-render.
Also, consider increasing the visibility of any error handling in the connection process that might help shed light on why it’s not triggering.
If you have any browser console errors or additional images/screenshots that might provide more context on the error, please feel free to share.
Let me know if there’s anything else you need or if you have more details to provide!
Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.