Рет қаралды 218
Learn how to log a user into an application using Node, Express, and the googleapis npm library. We will also learn what OAuth 2.0 is, how it relates to OpenID connect, what refresh, access, and ID tokens are, and more.
Google Cloud Console URL:
console.cloud.google.com/apis...
💻 My Software 💻
My Chrome Extension WittCepter - chromewebstore.google.com/det...
📚 My Courses 📚
courses.wittcode.com
👩💻 Download Code 👨💻
blog.wittcode.com
⌛ Timestamps ⌛
0:00 - Introduction
0:10 - Project Demonstration
1:07 - OAuth 2.0 Work Flow Demonstration
2:48 - OAuth 2.0 and OpenID Connect
3:19 - Google Cloud Console
3:51 - Creating an OAuth Consent Screen
5:09 - OAuth Scopes
5:40 - Creating Test Users
6:05 - Creating an OAuth ClientID
7:55 - Creating Environment Variables
8:50 - Project Initialization and Library Installation
9:38 - Installing Google API Client Library googleapis
10:08 - Creating a Start Script
10:42 - Initializing Express Server
11:44 - Creating and Serving the Login HTML File
12:42 - What is an ID Token?
13:55 - Handle Redirect to Google Auth Server
16:49 - Obtain Tokens from Google and Setting Cookies
19:30 - Using the Refresh Token to get a New ID Token
21:03 - Adding AuthController to Express
21:38 - Creating Authorization Middleware
23:19 - Adding Protected Routes
24:05 - Handling Logout
24:51 - Debugging
26:22 - Running the Application
28:13 - Fixing Logout Bug
29:14 - Outro