auth-js icon indicating copy to clipboard operation
auth-js copied to clipboard

onAuthStateChange function returns SIGNED_IN instead of SIGNED_UP

Open HassanIyan opened this issue 4 years ago • 1 comments

on phone sign up from supabase.auth.onAuthStateChange function it returns signed in instead of signed up. Please fix ASAP..

HassanIyan avatar Dec 08 '21 17:12 HassanIyan

Is there any reason we still don't have a SIGNED_UP auth event? It would be extremely helpful.

BloxsmithDevelopment avatar Jul 20 '22 23:07 BloxsmithDevelopment

Hey @HassanIyan, @BloxsmithDevelopment,

We want to try and keep the client library as unoppinionated as possible. Sign up is just a special case of a sign in, and it is somewhat difficult for the client library to keep track of state that way. If this is something you need, you can implement it by setting a flag in local storage or some other place. Additionally, you can always inspect the created_at property of the user object to see if the sign-up happened not a long time ago.

I'll close this issue as not planned, but feel free to comment if you need to provide more context.

hf avatar Sep 30 '22 15:09 hf