You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where there are some type of users I did not want to sign up at all. My initial assumption was that with OTP I would be able to create a temporary session for a given user without the need of signing the user up, thinking that a session would be created it would be authenticated and be able to take few actions on the platform. When I went into details to implement it I realized that it is not the case and the user always gets signed up.
My next assumption when preparing the middleware to protect some routes was that, as when you signUp() a user you get a Session object as a response, I was expecting to get back a Session object from signInWithOtp() (hoping to distinguish when to allow access to the OTP sign in and when to allow access to the verification route based on if there is a session or not and if there is a session but without a user yet until the verification happens), but again I was wrong in my assumption and reading the GoTrueClient, in all of the cases the return is return { data: { user: null, session: null, messageId: data?.message_id }, error }
So:
Any plans to allow passwordless sessions without the need of signing up a user?
Why is this difference in the design between returning a Session when signing up but not when signing in using OTP (which also signs up the user if not existing)? Any plans to return a Session instead pending to be verified with the OTP and then adding the User object to session.user?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
I have a use case where there are some type of users I did not want to sign up at all. My initial assumption was that with OTP I would be able to create a temporary session for a given user without the need of signing the user up, thinking that a session would be created it would be authenticated and be able to take few actions on the platform. When I went into details to implement it I realized that it is not the case and the user always gets signed up.
My next assumption when preparing the middleware to protect some routes was that, as when you
signUp()
a user you get aSession
object as a response, I was expecting to get back aSession
object fromsignInWithOtp()
(hoping to distinguish when to allow access to the OTP sign in and when to allow access to the verification route based on if there is a session or not and if there is a session but without a user yet until the verification happens), but again I was wrong in my assumption and reading the GoTrueClient, in all of the cases the return isreturn { data: { user: null, session: null, messageId: data?.message_id }, error }
So:
Session
when signing up but not when signing in using OTP (which also signs up the user if not existing)? Any plans to return aSession
instead pending to be verified with the OTP and then adding theUser
object tosession.user
?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions