Discord auth redirect error
I'm using Discord auth for my custom comunity app coupled with a SvelteKit hosted on Vercel.
I mostly followed the doc for SvelteKit and oauth setup and it works for most of my users.
But it does fail for just one. The redirect url I get is https://mydomain/callback?error=server_error&error_code=unexpected_failure&error_description=Error+getting+user+email+from+external+provider
It matches this issue but it's supposed to be fixed https://github.com/supabase/supabase/issues/6625
As this happens mostly on Supabase side, I don't really see what I can do to solve this. I was planning to use only Discord auth as it's the one that makes more sense in my case but then this single user is locked out of it :/
GitHub
Error Getting User Email From External Provider (DISCORD AUTH) · I...
Bug report Describe the bug So I have been working on this side project that uses discord auth. Everything has been working since I started (About a month). I went to power up the website and login...
2 Replies
Hey, I solved my issue! I got a second user with the same issues, we investigated together to finally conclude that the problem was that one of the user was missing an email address in their Discord account and the other was missing a phone number. For both, once having filled up their account, the login succeed.
Still, I think that's something that Supabase should cover because it's cryptic and not scalable if I had 5,000 users but at least it's identified and I can work around.
You have to have email in the third party auth for Supabase OAuth at the current time. I've never heard of a phone number being required in addition to email.