Discord integration problems.
Hi, I’m having an issue with integrating Discord with Better-Auth. In my app, I have the following logic using
authClient.linkSocial:
This is supposed to add an Account to the database linked to my user with Discord as the provider. The problem is that the authorization popup appears, the button at the bottom shows loading, and then literally after 2 seconds I get redirected back to my site with the URL /dashboard?discord=connected.
I have all environment variables set correctly — I’ve double-checked several times. I even added allowDifferentEmails to the account config in src/lib/auth.ts, but it didn’t change anything:
Do you have any idea what else I could try?
1 Reply
solved!