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
Not helpful
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
}
Great, thank you
Can I get complete source code git link ? I checked next-auth repo but it is not upto date with this tutorial
Ah mantab, hopefully youtube not gonna take this down again 😂
Yeah, hopefully.
Thanks you
It starts in the middle and ends in nowhere. I mean the video is useless.
can you provide source code?
how about sign up? i can't sign up with custom email
Anjay keren autu subs pokonya
Makasih banggg, sangat membantu ini
thanks a lot for everything... the way you do your tutorials are amazing... direct and to the point without adding unnecessary complexities ❤🔥❤🔥❤🔥❤🔥❤🔥❤🔥❤🔥❤🔥
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.🤩
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?
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.
Awesome! Your videos are super clear and instructive. I've learned alot! Keep it up! I've been waiting for this too!
You could have added the link to the previous one you made.
You can check it now in the video description ✅
I see tulisan hati
Orang indo nih pasti
धन्यवाद (Thanks)🙏
But what about signup? How can we store that user in custom database?
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
Thank you SOOOO much~
Setup Google adsense
lo keren bgt bang!
orangnya apa codenya bang? haha
Thanks for sharing.