Complete UPDATED Guide - Next.js Auth With Supabase

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 เม.ย. 2024
  • In this video, I cover a new, updated guide for implementing authentication using Next.js and Supabase.
    Final Code: github.com/coderyansolomon/up...
    Supabase Docs: supabase.com/docs/guides/auth...

ความคิดเห็น • 42

  • @jackkraus6948
    @jackkraus6948 หลายเดือนก่อน +4

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

    • @coderyan
      @coderyan  หลายเดือนก่อน +1

      Happy it helped!

  • @michele8491
    @michele8491 3 หลายเดือนก่อน +2

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

  • @nmdpa3
    @nmdpa3 3 หลายเดือนก่อน +1

    This approach really works well. Thanks.

  • @anibalasprilla85
    @anibalasprilla85 3 หลายเดือนก่อน

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

  • @kaneda1204
    @kaneda1204 2 หลายเดือนก่อน

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

  • @TacoWarriorX
    @TacoWarriorX 2 หลายเดือนก่อน

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

    • @coderyan
      @coderyan  2 หลายเดือนก่อน

      Happy it helped!

  • @christophernolan8761
    @christophernolan8761 15 วันที่ผ่านมา

    totally awesome. thanks for doing this

  • @Petyr25
    @Petyr25 หลายเดือนก่อน

    This video is crazy good. Love the effort.

    • @coderyan
      @coderyan  หลายเดือนก่อน

      Thank you. Really appreciate it

  • @dan.stacy1
    @dan.stacy1 3 หลายเดือนก่อน

    Great video! Thank you!

  • @firecool2
    @firecool2 3 หลายเดือนก่อน

    Thank you Ryan

  • @DrMorax
    @DrMorax 3 หลายเดือนก่อน +3

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

  • @nicomasset
    @nicomasset 3 หลายเดือนก่อน

    thanks for the video !

  • @ahmedmusawir
    @ahmedmusawir หลายเดือนก่อน +1

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

    • @coderyan
      @coderyan  หลายเดือนก่อน

      Happy it helped!

  • @cornelius-IndieHacker
    @cornelius-IndieHacker 3 หลายเดือนก่อน

    thanks you, ! Great video

  • @Monstermash355
    @Monstermash355 หลายเดือนก่อน

    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 3 หลายเดือนก่อน

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

  • @niademiogundana24
    @niademiogundana24 2 หลายเดือนก่อน

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

  • @AnthonyCandaele
    @AnthonyCandaele 11 วันที่ผ่านมา

    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?

  • @conanastasiou2568
    @conanastasiou2568 3 หลายเดือนก่อน

    Can I use this along with Prisma?

  • @AnthonyCandaele
    @AnthonyCandaele 10 วันที่ผ่านมา

    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.

  • @musa6173
    @musa6173 หลายเดือนก่อน

    thank you, mr. keanu reeves!!

    • @coderyan
      @coderyan  หลายเดือนก่อน

      Haha you’re welcome

  • @kelvins.kumordzi3203
    @kelvins.kumordzi3203 24 วันที่ผ่านมา

    i followed evrything exactly as it is, it worked on the first sign up but after trying again it says error.
    The redirects also do not work
    help!!

  • @boyo_23
    @boyo_23 3 หลายเดือนก่อน

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

    • @nmdpa3
      @nmdpa3 3 หลายเดือนก่อน

      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.

  • @lupleg
    @lupleg 3 หลายเดือนก่อน

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

  • @ewliang
    @ewliang 29 วันที่ผ่านมา

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

  • @cslearn3044
    @cslearn3044 3 หลายเดือนก่อน

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

    • @coderyan
      @coderyan  3 หลายเดือนก่อน +1

      Thank you, I appreciate that

  • @kelvins.kumordzi3203
    @kelvins.kumordzi3203 24 วันที่ผ่านมา +1

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

    • @coderyan
      @coderyan  24 วันที่ผ่านมา

      What does the error message say?

    • @kelvins.kumordzi3203
      @kelvins.kumordzi3203 24 วันที่ผ่านมา

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

  • @xbozo.
    @xbozo. 3 หลายเดือนก่อน +4

    that theme hurts my eyyes

    • @teetanrobotics5363
      @teetanrobotics5363 3 หลายเดือนก่อน

      yeah default vs code theme is awesome

  • @jaradaty88
    @jaradaty88 29 วันที่ผ่านมา

    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!

  • @SizzleReel-wd4hq
    @SizzleReel-wd4hq 2 หลายเดือนก่อน

    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?