filmov
tv
Login / Signup / SignIn with Google | OAuth2.0 | Using React and Express JS
Показать описание
In this video I show how to setup your Google Developer Console to create an OAuth 2.0 consent screen and OAuth2 client id credentials to allow signing in with Google. I then show where to get the official google-auth-library for creating the initializing url and verifying tokens and extracting credentials. After that I show how to setup two Express Routes! One will build the url and pass it back to our React front-end. The other will receive the reply from Google and authenticate the code. I also show how to setup your React UI to ping our backend to retrieve the built URL and ping the GoogleAuth api using the redirect! As a bonus I also show how to use this access token to request the users information from the googleapis for userinfo! I hope that you find this helpful!
Opening Tokens:
*There is additional information in here please read thoroughly such as the following*
GoogleGSI is probably easier to implement check it out here:
My channel membership is live check it out here!:
Membership perk video:
SvelteKit OAuth2 Video:
PocketBase SvelteKit OAuth2 Video Here:
*Note* Save yourself the headache and do NOT attempt to have a different a separate origin URI from your redirect URI : i.e. do NOT initiate the request from origin URI localhost:5173 and then try to redirect in your backend back to Google. Google will not send the code it will send a Cross Site Request Forgery token that you need an additional package and TONS of work (they rotate the keys), to pull out and verify!
OAuth2Client docs here:
Check out my channel @ConsultingNinja for more videos like these.
Requirements when using Google Sign in Docs:
Source Code Available Here:
Vite Video Here:
Express Video Here:
00:00 - Intro
01:27 - Google Console Setup
06:00 - ENV Setup in Express
07:32 - Express Setup
20:44 - React Setup
25:52 - Wrap-Up
Opening Tokens:
*There is additional information in here please read thoroughly such as the following*
GoogleGSI is probably easier to implement check it out here:
My channel membership is live check it out here!:
Membership perk video:
SvelteKit OAuth2 Video:
PocketBase SvelteKit OAuth2 Video Here:
*Note* Save yourself the headache and do NOT attempt to have a different a separate origin URI from your redirect URI : i.e. do NOT initiate the request from origin URI localhost:5173 and then try to redirect in your backend back to Google. Google will not send the code it will send a Cross Site Request Forgery token that you need an additional package and TONS of work (they rotate the keys), to pull out and verify!
OAuth2Client docs here:
Check out my channel @ConsultingNinja for more videos like these.
Requirements when using Google Sign in Docs:
Source Code Available Here:
Vite Video Here:
Express Video Here:
00:00 - Intro
01:27 - Google Console Setup
06:00 - ENV Setup in Express
07:32 - Express Setup
20:44 - React Setup
25:52 - Wrap-Up
Комментарии