I’ve encountered an issue when trying to use Web3Auth with the Coinbase Smart Wallet. Both authenticateUser() and web3auth.getUserInfo() return empty objects when connected with a Coinbase Smart Wallet.
This is problematic for server-side wallet verification, as I’m unable to retrieve the idToken for the wallet because of the empty responses.
Interestingly, these methods work as expected when using social login, and the objects are populated with the expected data. I am using PnP No Modal SDK.
Has anyone else faced this issue, or could there be a workaround for retrieving user information from Coinbase Smart Wallet?
In the screenshot above, you can see that the userInfo object is empty. Additionally, I believe the issue occurs when authenticateUser() attempts to launch the Coinbase Smart Wallet UI to sign the authentication message. However, this error is likely unrelated to the empty userInfo object.
Thanks for detailing your setup and mentioning you’re using the PnP (No Modal) SDK with Coinbase Smart Wallet. Since “web3auth.getUserInfo()” and “authenticateUser()” both return empty, it sounds like there might be a limitation retrieving idTokens when using Coinbase Smart Wallet as compared to social logins (which inherently provide OIDC tokens).
To better understand your configuration, could you share:
• Your Web3Auth initialization snippet (how are you configuring the PnP SDK?)
• Any console logs or browser screenshots (beyond the empty userInfo screenshot) that might reveal related warnings/errors
We’ll track this issue for you, and our support engineers will hop in soon.
Let us know, and we’ll help you troubleshoot further!
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.
Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. Web3Auth Developer Office Hours
The code is quite simple. By the way, it functions well in connecting users to their Coinbase Smart Wallet (CSW), which is the Coinbase wallet accessed via a passkey and distinct from the Coinbase wallet app.
Please note that in order to get an id token, you must sign a message which pops up in your wallet. This process is automatically done in the case of social login wallets, however for external wallets it has to be done manually.
Trying with the Playground won’t work: the Web3Auth Playground app supports only “Coinbase Wallet”. I am referring to “Coinbase Smart Wallet” which is a different type of Coinbase Wallet.
No I didn’t see the signing message. I think that is the issue I posted above: The popup window tries to load but fails. Also please note that the userInfo are also empty (not sure if it triggers a popup with an external wallet).
It is possible that you cannot call authenticateUser() from a useEffect hook, and must call from a button onClick in case of an external wallet. Let me confirm.
Hey @benoit.marcot thanks a lot for pointing out the exact issue, it helped us fix the particular problem. The fix has been deployed as it is working as expected.