Replies: 1 comment
-
Have you found a fix for this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have tried to enable redirects after signing in with no success.
I am using NextJS + Next-Auth, with the One-Click SIWE solution (with Wagmi) provided by the docs.
I enable redirects in the siweConfig object inside the verifyMessage function as so:
This works fine on desktop with Metamask (have not tried other wallets). On mobile, after redirecting, the next-auth signout route is called for some reason, and then I am prompted to sign a message again. This is an infinite loop of sign message, redirect, sign message again etc... This issue occurs with both Metamask and Trust Wallet. Curiously, this is not a problem with Uniswap Wallet and Metamask's built in browser.
I have resorted to just doing SIWE with Next-Auth the old fashioned way as a fix because debugging this has been near impossible for me.
Here is my new working onClick handler solution in my client-side sign in button for reference:
Beta Was this translation helpful? Give feedback.
All reactions