How do I check If a session has been loaded from storage or has been created from the sign-up #307
-
I have a question I would really appreciate if anyone could help me out. Iam new to Supabase. Okey, in my app, in the main activity Iam collecting the sessionState as a flow and responding to the Not Authenticated state by showing the sign-up screen and the Authenticated state by showing the main screen. However as soon as a user is successfully signed in from the sign-up screen, the session state changes, and they get redirected to the main screen...this is not what I want, as I want to collect more user information to update their profile in the next screen after they have signed up, at the same time to log them in automatically to the main screen when they are already signed in. I Guese what Iam asking is, is there a way for me to check whether the authenticated state of the user has been loaded from a previous session or has been created from the sign-up screen. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
There is no way to distinguish between those scenarios. If I'm understanding your question correctly, you want to ask extra information from your user after signing up? (And possibly store this information in an extra postgres table?). |
Beta Was this translation helpful? Give feedback.
Also you can access the user when the session state changed via
sessionState.session.user
(if the state is Authenticated)