code? trying to figure out how to implement the frontend correctly so we dont keep making new anon users. cookie not getting set correctly for some reason
With anonymous users you can remember that user's session. In the video example, we can remember that this specific user selected those specific seats, and if they were to refresh the page or come back later, we can still have those seats selected. An empty user session means there is no way to distinguish between the users who have visited the page but not authenticated. Therefore, every time they visited the page or refreshed, we would need to show the blank, unselected state. Does that make a bit more sense?
@@JonMeyersI think I got it. At first, I thought it's just keeping a temporary record in browser session. But anon user is actually created as a new user in supabase database, just without linking email/phone/oauth. These new anon users can later link email/phones/oauth to create a signin-able user. Right? A bit new concept to me since I thought features shown in apps like the one in this video were mostly in the front end, later merging the data to backend when user signs in. Pretty cool coz we can make more complex functionalities using this feature.
Requiring the email to be verified before allowing you to set a password feels like a huge roadblock, I’d like to be able to use a normal signup form to take both email and password when upgrading an anonymous user to a fully authenticated user in a single form. As of right now, it looks like you have to use email change ? And then from that link, go to a new page to type password? Please make a full example if you can
The user might have previously signed in with Google/other, and is currently signed in anonymously. When they decide to "upgrade" to Google/other-sign-in again, how should we reconcile data stored with references to the two different id's? I haven't been able to find documentation on what happens in cases like that. Are the identities merged? Which one is deleted? Does it fail? Is there a trigger/function one can create to deal with it?
Hey supabase lord, can you deep dive in the realtime section of supabase? it's documentation is good, but can we go even deeper? like putting triggers on channels table of realtime schema? make a notification system maybe?
You can wire up the session storage however you want, but the `@supabase/ssr` package will configure cookies for you. This example is written with Next.js, so you would not want to use Local Storage, as this is not available on the server. Therefore, the user's session would only be available to Client Components
If an anon auth user returns many times without authing, does that anon auth remain the same? so we could essentially grab info about that user like how many times they visited site before actually authing?
Yep, they remain the same Anonymous User every time they visit the page or refresh. This session is stored in a cookie, so will be the same user unless they are using a private browser or clear their cookies 🍪
"Demonstrate value to your users before jamming a login screen in their face!" So how come Supabase requires the actual creds before showing the dashboard? :D
Came for the video, stayed for the hair. 🤩💁♂️
Yeah, that wig looks sick! They should make a Supabase branded one!
Just to let you know, the link in the description takes you to a 404 page
fixed! supabase.com/blog/anonymous-sign-ins
Thanks! 🙌
Go deeper with Anonymous Users 👉 supabase.com/blog/anonymous-sign-ins
code? trying to figure out how to implement the frontend correctly so we dont keep making new anon users. cookie not getting set correctly for some reason
I'm actually confused about the difference between this anonymous user, and empty user session.
With anonymous users you can remember that user's session. In the video example, we can remember that this specific user selected those specific seats, and if they were to refresh the page or come back later, we can still have those seats selected. An empty user session means there is no way to distinguish between the users who have visited the page but not authenticated. Therefore, every time they visited the page or refreshed, we would need to show the blank, unselected state.
Does that make a bit more sense?
@@JonMeyersI think I got it. At first, I thought it's just keeping a temporary record in browser session. But anon user is actually created as a new user in supabase database, just without linking email/phone/oauth.
These new anon users can later link email/phones/oauth to create a signin-able user.
Right?
A bit new concept to me since I thought features shown in apps like the one in this video were mostly in the front end, later merging the data to backend when user signs in. Pretty cool coz we can make more complex functionalities using this feature.
Really cool to hear that supabase supports this. Would appreciate a bit of some slideshow work and if Jon would talk a bit slower 😅
In that example application, is it storing the state of selected seats in a database or is it using a cookie to store it?
Go deeper with Anonymous Users 👉 supabase.com/blog/anonymous-sign-ins
Love you Jon and Supabase, you're the best.
Thanks! 🙌 Glad you're enjoying the videos!
Requiring the email to be verified before allowing you to set a password feels like a huge roadblock, I’d like to be able to use a normal signup form to take both email and password when upgrading an anonymous user to a fully authenticated user in a single form. As of right now, it looks like you have to use email change ? And then from that link, go to a new page to type password? Please make a full example if you can
The user might have previously signed in with Google/other, and is currently signed in anonymously. When they decide to "upgrade" to Google/other-sign-in again, how should we reconcile data stored with references to the two different id's? I haven't been able to find documentation on what happens in cases like that. Are the identities merged? Which one is deleted? Does it fail? Is there a trigger/function one can create to deal with it?
Wondering if you could share the code used to create the anonymous user.
Thor sent me here to talk about Jon's hair
Yeah dude, that wig looks sick!
Hey supabase lord, can you deep dive in the realtime section of supabase? it's documentation is good, but can we go even deeper? like putting triggers on channels table of realtime schema? make a notification system maybe?
why not just use session storage or local storage?
You can wire up the session storage however you want, but the `@supabase/ssr` package will configure cookies for you.
This example is written with Next.js, so you would not want to use Local Storage, as this is not available on the server. Therefore, the user's session would only be available to Client Components
This one might help explain the Local Storage vs Cookie argument with Next.js
ua-cam.com/video/w3LD0Z73vgU/v-deo.html
If an anon auth user returns many times without authing, does that anon auth remain the same? so we could essentially grab info about that user like how many times they visited site before actually authing?
Yep, they remain the same Anonymous User every time they visit the page or refresh. This session is stored in a cookie, so will be the same user unless they are using a private browser or clear their cookies 🍪
Per device Id imagine.
Good topic, lots of useful info, but nearly unwatchable given the constant back and forth cuts from the screenshot to the presenter and back
YEP!
Glad you enjoyed it Guillaume 🙌
"Demonstrate value to your users before jamming a login screen in their face!"
So how come Supabase requires the actual creds before showing the dashboard? :D
W Supabase
Thanks! Glad you enjoyed it! 🙌
❤❤❤