Complete UPDATED Guide - Next.js Auth With Supabase

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 55

  • @jackkraus6948
    @jackkraus6948 5 месяцев назад +11

    I've been struggling with this all day, what a lifesaver. Thank you!

    • @coderyan
      @coderyan  5 месяцев назад +2

      Happy it helped!

  • @rajnimaster562
    @rajnimaster562 Месяц назад

    This tutorial is a good example why you should always use typescript for nextjs project.

  • @atadeniz18
    @atadeniz18 2 месяца назад

    Thank you, after going crazy with middleware usage in firebase I have decided to change to supabase

  • @michele8491
    @michele8491 7 месяцев назад +3

    Great video. I hope to see more supabase content in the future

  • @ahmedmusawir
    @ahmedmusawir 5 месяцев назад +3

    THANK YOU THANK YOU THANK YOU ... All my other tutorials are now obsolete ... geeeze

    • @coderyan
      @coderyan  5 месяцев назад +1

      Happy it helped!

  • @TacoWarriorX
    @TacoWarriorX 6 месяцев назад

    This guide was helped me understand SSR really well. i was able to transition to SSR now

    • @coderyan
      @coderyan  6 месяцев назад +1

      Happy it helped!

  • @DrMorax
    @DrMorax 7 месяцев назад +11

    why isn't there error handling in the login page? The user should know when a user is registered or the credentials are wrong

  • @anibalasprilla85
    @anibalasprilla85 6 месяцев назад

    Muchas gracias amigo... de verdad super útil este video... sigue ilustrándonos en Supabase y Next

  • @Petyr25
    @Petyr25 4 месяца назад

    This video is crazy good. Love the effort.

    • @coderyan
      @coderyan  4 месяца назад

      Thank you. Really appreciate it

  • @nmdpa3
    @nmdpa3 7 месяцев назад +1

    This approach really works well. Thanks.

  • @kaneda1204
    @kaneda1204 6 месяцев назад

    Hi Ryan, I love your videos! Very neat and easy to understand. Please, do more typescript. Saludos!

  • @im_jostincII
    @im_jostincII 2 месяца назад +2

    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...

  • @ewliang
    @ewliang 4 месяца назад

    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. 😅

  • @christophernolan8761
    @christophernolan8761 4 месяца назад

    totally awesome. thanks for doing this

  • @cslearn3044
    @cslearn3044 7 месяцев назад

    Don't need this, just came to like as you deserve it

    • @coderyan
      @coderyan  7 месяцев назад +1

      Thank you, I appreciate that

  • @AnthonyCandaele
    @AnthonyCandaele 4 месяца назад

    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.

  • @farisbayusetyawan579
    @farisbayusetyawan579 2 месяца назад +1

    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

  • @igorr4682
    @igorr4682 21 день назад

    Awesome video!

  • @diegoberistaindelamora6594
    @diegoberistaindelamora6594 3 месяца назад

    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?

  • @kelvins.kumordzi3203
    @kelvins.kumordzi3203 4 месяца назад +2

    i followed evrything exactly as it is, it worked on the first sign up but after trying again it says error.
    help!!

    • @coderyan
      @coderyan  4 месяца назад

      What does the error message say?

    • @kelvins.kumordzi3203
      @kelvins.kumordzi3203 4 месяца назад

      @@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

    • @rochie5273
      @rochie5273 3 месяца назад +1

      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

  • @musa6173
    @musa6173 5 месяцев назад

    thank you, mr. keanu reeves!!

    • @coderyan
      @coderyan  5 месяцев назад

      Haha you’re welcome

  • @Aivirx
    @Aivirx Месяц назад

    any OAuth tutorials with this?

  • @dan.stacy1
    @dan.stacy1 7 месяцев назад

    Great video! Thank you!

  • @niademiogundana24
    @niademiogundana24 6 месяцев назад

    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??

  • @lupleg
    @lupleg 7 месяцев назад

    I have some errors when I click on confirmation email link it's redirect me to a page which is not found.

  • @KevinAdda
    @KevinAdda 2 месяца назад

    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 ?

  • @Monstermash355
    @Monstermash355 5 месяцев назад

    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?

  • @lupleg
    @lupleg 7 месяцев назад

    Hopefully this help me I had challenge on how to setup the auth.

  • @AnthonyCandaele
    @AnthonyCandaele 4 месяца назад

    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?

    • @haha-eg8fj
      @haha-eg8fj 9 дней назад

      You just need to spend 1 minute on ChatGPT.

  • @nicomasset
    @nicomasset 7 месяцев назад

    thanks for the video !

  • @xbozo.
    @xbozo. 7 месяцев назад +5

    that theme hurts my eyyes

  • @firecool2
    @firecool2 7 месяцев назад

    Thank you Ryan

  • @data-IndieHacker
    @data-IndieHacker 6 месяцев назад

    thanks you, ! Great video

  • @boyo_23
    @boyo_23 7 месяцев назад

    Is it possible to protect a route through middleware?
    Where the middleware handles both refreshing sessions and protecting routes.

    • @nmdpa3
      @nmdpa3 7 месяцев назад

      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.

  • @marierasmussen7799
    @marierasmussen7799 Месяц назад

    Please, please use typescript. Beginners should be starting out correctly.

  • @conanastasiou2568
    @conanastasiou2568 7 месяцев назад

    Can I use this along with Prisma?

  • @SizzleReel-wd4hq
    @SizzleReel-wd4hq 6 месяцев назад

    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?

  • @jaradaty88
    @jaradaty88 4 месяца назад

    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!

  • @tonybenci2796
    @tonybenci2796 21 день назад

    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.