Build OAuth 2.0 Integration with Next-Auth V5, Next 14 and Google OAuth

preview_player
Показать описание

#nextauth #oauth2 #nextjstutorial #next14 #googleoauth #reactjs #frontenddevelopment

Code:

Auth V5 issue:

✨ My Links -

Timecodes:
0:00 - Intro
1:24 - Chapters
2:01 - OAuth 2.0 Detailed Implementation
5:30 - Setting up google oauth on console
8:31 - Next-auth V5 with google provider
14:42 - Saving access_tokens in a JWT cookie
16:15 - Accessing google calendar using access-token
17:51 - Auth V5 issue that you need to know
20:23 - Handling Token Expiry
24:15 - Final thoughts
Рекомендации по теме
Комментарии
Автор

This video is superior.... I have seen a lot of video, they guys just teaches to sign in, but they don't perform authorization things like making a authorized request and all
You won bro You won

ashokasec
Автор

next level content, now i am planning to build CRUD google cal events from my site

starlord
Автор

Thanks! This is so much helpful!
Regarding the bug that next-auth currently has - If get that right,
Both useSession from next-auth/react, and auth() returned from NextAuth returning the session, while auth() should return the jwt object?

edenberdugo
Автор

Great job. Congratulations!!! How can I perform authentication on a /login route instead of at the root as seen in the video?

joseantonioromeroespejo
Автор

Will you make a course on Nextjs which includes a big section of authentication, filtering, pagination, infinite scrolling

zunnoorainrafi
Автор

I want multiple social accounts management, I want it to be able to detect that another account is using the same email and invite them to connect the account just like clerk is doing it

codernerd
Автор

I already have auth using next auth with normal permission also with credentials. i want to implemnent such that if wants to use calendar api he can upgrade the permisiions

diwanshuji
Автор

In Login flow, the "conset screen UI" and "user gives consent" happens on Google Auth Server. After user's consent, redirect to "callback url" happens.

saurabhprakash
Автор

in my auth callback my session callback is running multiple times which is causing multiple drizzle fetch requests, I am getting timeout error from drizzle, Why my session is running multiple times

kasper