auth icon indicating copy to clipboard operation
auth copied to clipboard

Oauth fails when no email is linked to account

Open lunandd opened this issue 4 years ago • 26 comments

Feature request

Problem

Supabase Oauth relies on the assumption that users signing in with Oauth providers have an email linked to their account, which isn't always the case.

Solution

It would be nice if phone numbers could be used instead of email when using Oauth.

Example

An example is Facebook. If users haven't linked an email to their account they're screwed. This may turn off some from my app/website and lead them to using an alternate app/website

lunandd avatar Sep 09 '21 15:09 lunandd

Related to this: https://github.com/supabase/supabase/issues/2853

sandbox-apps avatar Sep 11 '21 09:09 sandbox-apps

I'll move this to the GoTrue repo so that the auth team can comment 👍

@kangmingtay - the related issue here has a lot of discussion. I'll leave it in the supabase repo for now but can shift it here if you prefer (or close this as a duplicate)

kiwicopple avatar Sep 12 '21 01:09 kiwicopple

Adding a +1 here. Ran into this adding Discord login. I'm working on crypto/web3 use cases so asking for email is unfortunately a no go.

jtgi avatar Jan 26 '22 09:01 jtgi

Anything we can do to help? +1 as well for this

adrianhorning08 avatar Feb 04 '22 20:02 adrianhorning08

+1. Facing issue with Twitter Oauth when there is no email linked with the user account.

https://github.com/supabase/supabase/issues/2853

RamyaChinnadurai avatar Feb 16 '22 18:02 RamyaChinnadurai

Seems like this issue makes Supabase auth unusable for a large chunk of users...unfortunate because it's a big part of the value proposition.

jnorris441 avatar Feb 23 '22 00:02 jnorris441

I spent ages trying to debug this. I think in the meantime there should either be a) a big red flag in the docs on potentially effected providers (ran into it with Twitter in my case), or just flat out disabling those providers until there's a fix. Because it means that any provider where an email isn't guaranteed could fail randomly in production after testing during dev.

madeleineostoja avatar Mar 01 '22 07:03 madeleineostoja

I'm experiencing the same issue. My accounts DO have emails so I think the root cause here is missing middleware to handle the additional request for the email from the API.

This maybe helpful: https://auth0.com/rules/get-twitter-email

oespn avatar Mar 04 '22 03:03 oespn

+1 for this, ran into the same issue with Twitter OAuth

sarimrmalik avatar Mar 05 '22 05:03 sarimrmalik

Hi everyone! We've started to work on this issue and are aware that this is not ideal for anyone who wants to oauth as the primary login mechanism. The PR is mentioned above and feel free to ask any questions / add in your thoughts. We will do this in phases for each provider instead of all at once. The first phase will include twitter and facebook for now.

Currently, the main question I have is:

  1. Should a user who signs in with the oauth provider without an email address be automatically confirmed?

kangmingtay avatar Mar 08 '22 15:03 kangmingtay

@kangmingtay I think if you are trusting a third party to vouch for their identity there is no reason to confirm them again. Maybe that is simplistic

jnorris441 avatar Mar 09 '22 01:03 jnorris441

Agree about confirmation, to me the whole point of oauth is handing off validation to a trusted 3rd party

madeleineostoja avatar Mar 09 '22 10:03 madeleineostoja

Any updates on this PR? thanks :)

magikmea avatar Sep 05 '22 18:09 magikmea

hey everyone, i've left a reply on the PR to explain why we have decided not to move forward with it yet: https://github.com/supabase/gotrue/pull/414#issuecomment-1238321323

kangmingtay avatar Sep 06 '22 15:09 kangmingtay

I'm glad there was work done for this.

Is there a workaround better than putting in a fake auto-confirmed email like [email protected]?

jnorris441 avatar Sep 07 '22 04:09 jnorris441

Thanks for taking a look at this, @kangmingtay. I'm happy to brainstorm suggestions in the meantime. Still, regarding my project, this is a severe hold-up, and the feasible workaround is to revert to Firebase/some other provider until this is solved.

richawo avatar Sep 10 '22 00:09 richawo

@RichardAwoyemi Really sorry to hear that. We're working on quite a few things in the enterprise space this year and it's unlikely we'll be able to get to this. We are very aware of the issue and it is high on our agenda, but can't promise any timelines yet.

hf avatar Sep 29 '22 11:09 hf

Any update in 2024? :) Thank you for your open source work by the way! 🚀

gaceladri avatar Jan 30 '24 20:01 gaceladri

I'd love to see this fixed as well.

michaelmagan avatar Mar 13 '24 22:03 michaelmagan

Any update on this?

sanderhelleso avatar May 06 '24 07:05 sanderhelleso

Any update?

yjgaia avatar May 25 '24 13:05 yjgaia

any update? thanks!

nazariyv avatar Jun 12 '24 21:06 nazariyv

Hi guys, any updates on this?

arnerlgames avatar Jun 12 '24 21:06 arnerlgames

any update?

Silur avatar Aug 16 '24 18:08 Silur