Add Authentication to Next.js: Login with Google

Поделиться
HTML-код
  • Опубликовано: 1 окт 2024
  • Learn how to add Login with Google to your Next.js app using NextAuth.js, Prisma, and Supabase.
    Part 1 - Create the Form: • Create Form and Valida...
    Part 2 - Email and Password Auth: • Build a Complete Sign-...
    part 3 - Login with google • Add Authentication to ...
    🔗Source:
    [supabase] supabase.com/
    [prisma.io] www.prisma.io/
    [next-auth] next-auth.js.o...
    [prisma-adapter] www.npmjs.com/...
    #programming

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

  • @WebPawn
    @WebPawn 7 месяцев назад +2

    Not helpful

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

    Their is a bug in the tutorial if you'll create a user with the google login but the use that user's email and try to login with credentials provider by enter that user's email and any wrong password at the password field you'll successfully logged in into that user's account.
    And to solve this issue you've to add another line into the auth.ts file which is
    if (existingUser.password) {
    const passwordMatch = await bcrypt.compare(credentials.password, existingUser.password)
    if (!passwordMatch) return null
    } else {
    return null
    }

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

      Great, thank you

  • @SwapnilBari-k4l
    @SwapnilBari-k4l 6 месяцев назад +1

    Can I get complete source code git link ? I checked next-auth repo but it is not upto date with this tutorial

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

    Ah mantab, hopefully youtube not gonna take this down again 😂

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

      Yeah, hopefully.

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

    Thanks you

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

    It starts in the middle and ends in nowhere. I mean the video is useless.

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

    can you provide source code?

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

    how about sign up? i can't sign up with custom email

  • @Vinex-ye1du
    @Vinex-ye1du Месяц назад

    Anjay keren autu subs pokonya

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

    Makasih banggg, sangat membantu ini

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

    thanks a lot for everything... the way you do your tutorials are amazing... direct and to the point without adding unnecessary complexities ❤‍🔥❤‍🔥❤‍🔥❤‍🔥❤‍🔥❤‍🔥❤‍🔥❤‍🔥

  • @NoraAbdullahAl-Hatem
    @NoraAbdullahAl-Hatem 4 месяца назад

    From the Kingdom of Saudi Arabia, I say to you, thank you for everything you provide on your channel. It is very wonderful and you are a genius.🤩

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

    just got one question, hes using react hooks on the button component but it does not have "use client" at the top. Is this because SignInForm is a client component and since the button is being rendered on SignInForm (and server components cannot be rendered on client components) that the button is defaulted as a client component?

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

    I've been really looking forward to this topic: Logging in with Google. The previous lecture on next auth credentials and stuff was awesome... Thanks a bunch for making that RUclips video. You're hands down the best tutor.

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

    Awesome! Your videos are super clear and instructive. I've learned alot! Keep it up! I've been waiting for this too!

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

    You could have added the link to the previous one you made.

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

      You can check it now in the video description ✅

  • @Vinex-ye1du
    @Vinex-ye1du Месяц назад

    I see tulisan hati

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

      Orang indo nih pasti

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

    धन्यवाद (Thanks)🙏

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

    But what about signup? How can we store that user in custom database?

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

      It's easy, after clicking on btn google check if this email is already in db if yes bring his data from db if no insert his data to db

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

    Thank you SOOOO much~

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

    Setup Google adsense

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

    lo keren bgt bang!

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

      orangnya apa codenya bang? haha

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

    Thanks for sharing.