How to Integrate Auth0 & Next.js | User Authentication in Next.js with Auth0

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

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

  • @PranawwWW
    @PranawwWW 9 месяцев назад +4

    would be so wrong if i didnt thank you for this , was going through a rough time configuring auth0 with my next js app but then i stumbled upon your video and believe me this helped a lot , thanks man , wishing you all the success!

  • @deejinng
    @deejinng Год назад +1

    NOTE!!
    NOT SO RELATED.
    When a Nextjs app has been built(I mean using command like "npm run build" with some environment variables bundled with it).
    Those keys kept in Environment Variables can they be found in the bundled code ?

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

    This is insane! I am so glad. Thank you for good tutorial!!!!

  • @Yasin3D
    @Yasin3D Год назад +1

    Watching your videos makes me feel motivated to do something productive in my life and not sleep all day.

  • @seanelevate
    @seanelevate Год назад +3

    Hey thanks man, this was a great simplified tutorial. Appreciate it.

  • @8bulletballers385
    @8bulletballers385 Год назад +5

    Hey Arpan, you're freaking awesome! I initially found you from your 'React + Express/Node.js' linking-video! Super cohesive and clear! That said, I was wondering if you could make a video where you integrated Express with NextJS, as I can't seem to find any in-depth youtube videos (or any, in general) on that topic? Thanks!

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

    Thanks for this video! Do you also have a tutorial that shows how to leverage Auth0 Roles & Permissions using Next.js?

  • @codewithguillaume
    @codewithguillaume Год назад +1

    node -e "console.log(crypto.randomBytes(32).toString('hex'))"

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

    Can you please explain me how can we change the url in our deployment like you create localhost:3000 in the auth0 app

  • @kayasso
    @kayasso Год назад +1

    thank you, can you please do a tutorial on next auth with the provider "next-auth/providers/duende-identity-server6"

  • @Ramon314
    @Ramon314 Год назад +1

    I use auth0 in my server actions, in there I request the accessToken. But when the access token of the user expires, I het an error message saying "Error: The access token expired and a refresh token is not available. The user will need to sign in again.". How to fix this? I tried automatically redirecting the user to the logout endpoint but I was not able to make the user resirect from the server action since it runs on the server and not the client.

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  9 месяцев назад

      Hi, my apologies for the late reply as I did not receive see your comment until now. Please check out this link and let me know if this was of help: github.com/auth0/nextjs-auth0/issues/452

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

    Hello Sir I am using this in my project but facing issue logout handler logout is clearing session but it's not redirected to another router or login

  • @at4371
    @at4371 Год назад +2

    subscribed bro ! Thank you.I wanted quick information about Auth0 for project I was not part of and your video helped me. hope you have udemy course you are awesome !

  • @HarvinderGeek
    @HarvinderGeek Год назад

    did exactly as you told on clicking the login i get 500 internal error

  • @hugossp
    @hugossp Год назад +1

    Hey mister, great tutorial. I am having problems with this. I can properly log in but the access token generated is not a correct JWT. It has signature error. Can you make a tutorial showing how to get the proper JWT to save on local storage? Many thanks!

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  Год назад +1

      You have to make a request to
      AUTH0-DOMAIN/oauth/token with your client id, client secret, grant type, and audience. This must be a POST request with Content-Type set to application/json. You can make an API route in Next.js inside /pages/api/accessToken/accessToken.ts and return it there. Your backend can either fetch it from there, or you can make relative requests on your frontend and send the token through a request to the backend.

  • @fullstackprojects
    @fullstackprojects 8 месяцев назад

    how to get accesstoken ?

  • @VadimBogomazov
    @VadimBogomazov 10 месяцев назад

    cool but does not work with next js 14

  • @y0ake77
    @y0ake77 8 месяцев назад

    Thanks for this awesome tutorial ❤❤

  • @okerror1451
    @okerror1451 Год назад +1

    just some feedback that your keyboard noise is pretty loud

  • @leviwins
    @leviwins 10 месяцев назад

    this is old, how about using app router as opposed to pages

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  9 месяцев назад

      You're right! This video was recorded during the beta phase of app router and as most of my audience had used the pages router, this was more insightful at the time. I do have a few videos down the pipeline regarding Auth0 and app router is in there as well :)

  • @coderunner5273
    @coderunner5273 Год назад

    what is your nationality?

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  Год назад

      I was born in Nepal; my family is from there, but I was raised in the US

    • @coderunner5273
      @coderunner5273 Год назад

      @@ArpanNeupaneProductions i am from Nepal and thanks for tutorial ❤

    • @nghiala26
      @nghiala26 9 месяцев назад +1

      ​@@ArpanNeupaneProductionsyour accent is very clear and easy to follow

  • @adtc
    @adtc Год назад +1

    Was excited to see this tutorial, until you said you're going to use page router. App router is the future! Moving on to find another tutorial...

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  Год назад +1

      Lol, it is the future. I just figured since more people are used to pages router, it’d be simpler for them to integrate. App router coming soon.

    • @adtc
      @adtc Год назад

      @@ArpanNeupaneProductions Thank you for replying. I watched it anyway because I can't find one on App Router. Well, I scrubbed through, because this tutorial is still on the basic level and I already did all that. Is there an advanced tutorial which shows how the various other states are handled, like user failed to login, user was denied access, some error happened, etc.? I'm especially looking to solve the problem where even if I logout, when I login it doesn't ask me to choose the account to login. It just logs me into the last account. It's really annoying and I don't know how to solve the problem. Forum posts tell me nothing.

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  Год назад +1

      @@adtc You have to adjust Auth0 settings for that, I believe. The reason it resets is most likely because the auth access token is refreshed. You can change the expiry time for the tokens in Auth0 settings.

    • @ArpanNeupaneProductions
      @ArpanNeupaneProductions  Год назад

      @@adtc There’s also another provider called Clerk which you can use to add authentication, in case Auth0 is causing trouble.

  • @alihusseini5251
    @alihusseini5251 8 месяцев назад +1

    Am I the only person in this planet?😂😂 when ever i watch a tutorial and follow all the way using codes in my project ,they dont work the way out .

    • @WardR3
      @WardR3 8 месяцев назад

      Me too 😂

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

      Same 😂. wasted tons of time like that.

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

    node -e "console.log(crypto.randomBytes(32).toString('hex'))" | clip
    so it's directly output to the clipboard and ready to paste