Thanks, but I've run into a few things. 1. Login error handling is impractical 2. when trying to pass the error to the ui with catch, it always returns the same error, and there is no way to take the error that supabase returns in its response...
I unintentionally trolled myself by making the raw_user_meta_data too big resulting in a split up cookie returned to me. I didn't realize what was going on until later on. Had to update my utils/supabase files to handle this edge case. 😅
thanks Ryan for this instructive video. How would you handle admin users? Admin users should have access to the admin route, but regular users should not have access to the admin route.
Hi Ryan, your video are so cool. But, I confused about how to handle the error, like showing an error message when login or signup is failed? In your video, it will redirect to another page, but how to make it just stay in login or signup page with an error message. Thank you
The best and most actualized video, but i got a problem woth auth route, im using magic link but when i send the type and hash token it throw an error saying is expired or unavailable but why?
@@coderyan the error message says Uncaught (in promise) Error: Called encrypt() without a session key at SecretSession.encrypt (background.js:1:12029) at SecretSession.createSMSG (background.js:1:5665) at GetLoginNames4URL (background.js:1:36719) at background.js:1:39849
Supabase has a cap on email requests per hour (the confirmation email). You can either setup an SMTP provider, or go into supabase settings and turn off email confirmation
Hey. Thank you so much for this video. How can I add oauth providers to the page (sign in with google, sign in with microsoft, all that fun stuff)? I used to use nextauth, do I still use that??
Hi, thanks that is some very good content right here, however I heard somewhere that NEXT_PUBLIC variables are visible in plain text in the browser. did anyone have a solution ?
Thanks a lot for this video. However for my next project I have 2 different types of users, regular users and admin users. Only users with the 'admin' role should have access to the admin route. How should you implement that?
Was wondering this myself...but the supabase doc gives me the impression we should "not" rely on middleware for authentication, and instead use supabase.auth.getUser in pages, components, etc. So what I did, following this, was to create a (protected) folder, put all my protected app routes in it, then put the call to supabase.auth.getUser in a layout.tsx file inside the (protected) folder. Worked like a champ and only had to be coded in 1 place. The call to getUser is checking for a session on the supabase server, and avoids using getSession, which checks cookies, as noted by supabase doc.
Thanks for the video, but supabase!!! Whaaat is this, using nextjs auth is easier now...we use supabase to make the auth process ez not to complecate it!
Ryan, not wanting to be a naysayer. Doing things in JavaScript doesn't make it more "accessible" mate. It just makes it easier as when you download ts scripts from the supabase site that don't LINT it is a pain in the arse. But what is more a pain in the arse is when we start a tutorial and we're using typescript and nothing you're showing us works. I would love to see you use ts and sort this craziness out for us. Like I said, really appreciate the effort but to show us JS you might as well be showing the greater NextJS community basic.
I've been struggling with this all day, what a lifesaver. Thank you!
Happy it helped!
This tutorial is a good example why you should always use typescript for nextjs project.
Thank you, after going crazy with middleware usage in firebase I have decided to change to supabase
Great video. I hope to see more supabase content in the future
THANK YOU THANK YOU THANK YOU ... All my other tutorials are now obsolete ... geeeze
Happy it helped!
This guide was helped me understand SSR really well. i was able to transition to SSR now
Happy it helped!
why isn't there error handling in the login page? The user should know when a user is registered or the credentials are wrong
Muchas gracias amigo... de verdad super útil este video... sigue ilustrándonos en Supabase y Next
This video is crazy good. Love the effort.
Thank you. Really appreciate it
This approach really works well. Thanks.
Hi Ryan, I love your videos! Very neat and easy to understand. Please, do more typescript. Saludos!
Thanks, but I've run into a few things.
1. Login error handling is impractical
2. when trying to pass the error to the ui with catch, it always returns the same error, and there is no way to take the error that supabase returns in its response...
I unintentionally trolled myself by making the raw_user_meta_data too big resulting in a split up cookie returned to me. I didn't realize what was going on until later on. Had to update my utils/supabase files to handle this edge case. 😅
totally awesome. thanks for doing this
Don't need this, just came to like as you deserve it
Thank you, I appreciate that
thanks Ryan for this instructive video. How would you handle admin users? Admin users should have access to the admin route, but regular users should not have access to the admin route.
Hi Ryan, your video are so cool. But, I confused about how to handle the error, like showing an error message when login or signup is failed? In your video, it will redirect to another page, but how to make it just stay in login or signup page with an error message. Thank you
Awesome video!
Thank you!
The best and most actualized video, but i got a problem woth auth route, im using magic link but when i send the type and hash token it throw an error saying is expired or unavailable but why?
i followed evrything exactly as it is, it worked on the first sign up but after trying again it says error.
help!!
What does the error message say?
@@coderyan the error message says
Uncaught (in promise) Error: Called encrypt() without a session key
at SecretSession.encrypt (background.js:1:12029)
at SecretSession.createSMSG (background.js:1:5665)
at GetLoginNames4URL (background.js:1:36719)
at background.js:1:39849
Supabase has a cap on email requests per hour (the confirmation email). You can either setup an SMTP provider, or go into supabase settings and turn off email confirmation
thank you, mr. keanu reeves!!
Haha you’re welcome
any OAuth tutorials with this?
Great video! Thank you!
Hey. Thank you so much for this video. How can I add oauth providers to the page (sign in with google, sign in with microsoft, all that fun stuff)? I used to use nextauth, do I still use that??
I have some errors when I click on confirmation email link it's redirect me to a page which is not found.
Hi, thanks that is some very good content right here, however I heard somewhere that NEXT_PUBLIC variables are visible in plain text in the browser. did anyone have a solution ?
How to send success/error toast from server actions?
Do we need to return something from them and call the toast in the client component?
Hopefully this help me I had challenge on how to setup the auth.
Thanks a lot for this video. However for my next project I have 2 different types of users, regular users and admin users. Only users with the 'admin' role should have access to the admin route. How should you implement that?
You just need to spend 1 minute on ChatGPT.
thanks for the video !
that theme hurts my eyyes
yeah default vs code theme is awesome
Thank you Ryan
thanks you, ! Great video
Is it possible to protect a route through middleware?
Where the middleware handles both refreshing sessions and protecting routes.
Was wondering this myself...but the supabase doc gives me the impression we should "not" rely on middleware for authentication, and instead use supabase.auth.getUser in pages, components, etc. So what I did, following this, was to create a (protected) folder, put all my protected app routes in it, then put the call to supabase.auth.getUser in a layout.tsx file inside the (protected) folder. Worked like a champ and only had to be coded in 1 place. The call to getUser is checking for a session on the supabase server, and avoids using getSession, which checks cookies, as noted by supabase doc.
Please, please use typescript. Beginners should be starting out correctly.
Can I use this along with Prisma?
Definitely use TypeScript going forward. Good practice and makes for better code, it's also redundant to copy the .ts file and then delete it?
Thanks for the video, but supabase!!! Whaaat is this, using nextjs auth is easier now...we use supabase to make the auth process ez not to complecate it!
Ryan, not wanting to be a naysayer. Doing things in JavaScript doesn't make it more "accessible" mate. It just makes it easier as when you download ts scripts from the supabase site that don't LINT it is a pain in the arse. But what is more a pain in the arse is when we start a tutorial and we're using typescript and nothing you're showing us works.
I would love to see you use ts and sort this craziness out for us. Like I said, really appreciate the effort but to show us JS you might as well be showing the greater NextJS community basic.