Add Authentication to Next.js in 10 mins with OAuth (Google, Github...)

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

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

  • @ziacodes
    @ziacodes Год назад +31

    Why to make "IsloggedInServer and the IsLoggedClient" function and add to every page, it will be repeating the same thing.
    Isn't the middleware a best option for this type?

  • @dachewster9999
    @dachewster9999 Год назад +28

    You didn't use the latest version which is AuthJs, and you didn't use middleware, so what you showed is not very good

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

      ?

    • @анче-у2ш
      @анче-у2ш 11 месяцев назад +6

      And didn't deploy on vercel, so credentials won't work

    • @袁金忠
      @袁金忠 Месяц назад

      @@анче-у2шDoes the Nextjs project have to be deployed on vercel? Is it bound too deeply? Is there any other deployment method? Thank you,bro.

  • @sholavandan81
    @sholavandan81 Год назад +14

    The github code is missing the next-auth specific implementation for Google & github. Can you please push the code into the repo? It would help us to go through the code and implement.

  • @tomasburian6550
    @tomasburian6550 11 месяцев назад +2

    You forgot to show us how to set up the authorizatiion for GitHub, but otherwise... good video. I've learned a lot.

  • @hamzandev9482
    @hamzandev9482 Год назад +4

    How i can store the user information to database like postgres if the user signed in using GitHub or other providers?

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

      Same, and what if I want to remove any user how can I do that

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

    great tutorial! question - how do you use hooks inside a condition? isnt it against react hooks rules?

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

    Which vscode theme you are using ?

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

    Any idea how we can deploy this on Google Cloud Run (with variables & secrets) and/or Vercel? My ENV variables do not seem to work on either. Thanks man

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

    Excellent video!

  • @brunomartins3055
    @brunomartins3055 11 месяцев назад

    top man keep it cool great job

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

    how about next js next auth with nest js as a backend.....

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

    thank you for the help, i have been struggling with authentication for weeks

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

    Hi, in production the login doesent work, any idea why ? I use same urls for dev and production build, dev works great, production (local) not.

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

    Question: for authButtonsFiles - I am not certain why there are two buttons ( google / github ) when it could have been refactored into one for instance ?
    Did you had / do you have specific reasons or was it made just on the fly for the purpose of the video ?

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

    Hi, thanks for the nice video. I notice that in production, as you click the button to use google or github, chrome flags your site as dangerous, why is that, any way to fix it.

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

    very good tutorial.. thanks!!

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

    Have you tried the refreh token strategy?

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

    Very practical way of using next-auth with next js . Thanks

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

    when you "contiune with Google" does your data get saved on the prisma database, because when i try this, I cannot find the user data in my prisma studio

  • @Adrian-mu8gg
    @Adrian-mu8gg Год назад

    what if i use the credentials provider but forget password? does next-auth got any thing out of the box to handle that? like email resend reset password token?

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

    what theme is that

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

    Why don't you need an adapter for the auth configs?

  • @LemanGahramanova-kh8fb
    @LemanGahramanova-kh8fb 7 месяцев назад

    i have an error: Error with Permissions-Policy header: Unrecognized feature: 'ch-ua-form-factor'.
    How i can fix this problem?

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

    Great Job... I love your teach

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

    how do you sign out of the github API? i can sign out on my app, but i'm still logged in through github :(

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

    amazing video, thank you so much it helped me out a lot!!

    • @aiknowledge-n2s
      @aiknowledge-n2s 11 месяцев назад

      Could you help me find the previous video?

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

    I have a problem with authentication, how can I automatically cancel authentication? when i am logged in and i close windows then open it but it logs in by itself

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

    can you explain us how to customize the sign in form?
    like the GoogleSignInButton and GithubSignInButton
    thanks

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

    Nice video. please mind sharing what font and theme you are using for vscode?

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

    Best way for a custom backend to integrate with Google provider, ideally i need mmy backend to track accounts through the creation of user entities in the backend as each user will have their own data.

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

    Great tutorial, does the Google login and Credentials login handle the refresh token, CSRF etc !!!

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

    where did you pass the nextauth secret?

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

    Great job dude 🎉 tks

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

    Thank you so much, its works

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

    hi, i did that but after try to login i have error below
    Try signing in with a different account.
    expected 200 OK, got: 403 Forbidden
    can't find anything for that

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

    how can i use DiscordProvider?

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

    Hey man, nice explanation. Thank you. But Is there a way do the same kind of email checking like in the credentials provider with the Google Provider? Let's say I have a user table and when someone trying logging in with Google, their email needs to be cross-matched with a user from the user table. if matched they should be allowed to login otherwise redirect to login page. Can anyone suggest a solution for this problem? TIA

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

    Thank you kindly!

  • @袁金忠
    @袁金忠 Месяц назад

    amazing video,can u show me the github repository? i really need it

  • @kiliusz
    @kiliusz Год назад +4

    said 5min
    title 10min
    video length 20min

  • @2kceltics
    @2kceltics Год назад

    I could login using Github but it didn't redirect me to the "dashboard || timeline || etc" I stay in the same page with my session started. How can I do to redirect after login with github/google ?

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

      I too have the same issue sir, any update on your side?

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

    good video sir

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

    Great video. Where can I find the source code of this particular video?😃

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

    nice video

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

    Nice tut Bruh, bbut I can't get the Git Repo, I looked, up and down, but did not see it!

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

      github.com/ipenywis/nextjs-auth

  • @aiknowledge-n2s
    @aiknowledge-n2s 11 месяцев назад

    Where is the previous video where he built the whole clone? @CoderOne

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

    i dont understand u add a lot of code before...

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

    source code? github ?

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

      github.com/ipenywis/nextjs-auth

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

    2FA would make it even more secure

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

    thanks bro

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

    how can i get te toke.. ehe

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

    Kindly make new video using authjs

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

    ✨👌

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

    6:03 coding and talking is hard.

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

    it took me over 1 h and i stil dont have that....

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

    Good day greetings

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

    its 20 min

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

    Title: Add Authentication to Next.js in 10 mins
    Video Duration: 20 mins.

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

      It's called a "VIDEO TUTORIAL". So I have to go through and explain all the bits and details so everyone from beginner to advanced can easily understand and walk away happy. It says 10mins because anyone can add auth in 10mins but it doesn't necessarily mean that the video will be less than 10mins. The video is meant to make people understand not just implement it and walk away!

    • @aiknowledge-n2s
      @aiknowledge-n2s 11 месяцев назад

      @@CoderOne I want to explore the previous video where you build the whole twitter clone.
      Could you give me the link of that video please?
      I need it urgently.

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

    I don’t like people that start sentences with “oh”

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

    unclear as hell

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

    these captions are irritating