supabase / auth

A JWT based API for managing users and issuing JWT tokens
https://supabase.com/docs/guides/auth
MIT License
1.55k stars 374 forks source link

Cannot Use Both Email and Phone Providers Simultaneously #1839

Closed MuddasirAlgoace closed 1 week ago

MuddasirAlgoace commented 1 week ago

I am trying to register a user using both email and phone authentication in Flutter app with Supabase, but encountering the following error:

149 - assert((email != null && phone == null) || (email == null && phone != null),
150 - 'You must provide either an email or phone number');

This error arises because Supabase currently enforces a condition where only one of either email or phone is provided for user signup. However, I want to allow both email and phone parameters to be provided simultaneously, as it would make verification easier before future authentications.

Is there a way to modify or extend the logic in Supabase to support both email and phone authentication providers during signup? and their provider must be working on login seprately.

J0 commented 1 week ago

Closing as duplicate of #1840