Google OAuth in NestJS: Complete Passport Strategy Tutorial | Login with Google

Опубликовано: 25 Май 2026
на канале: NestJS Simplified
48
2

🔐 Add "Sign in with Google" to your NestJS application! This complete tutorial shows you how to implement Google OAuth 2.0 using Passport.js strategy.

Sign in with Google increases conversion by 50%. Users trust it, it's secure, and it means NO passwords to manage.

⏱️ TIMESTAMPS:
0:00 - Intro: Why Google OAuth?
0:45 - Understanding OAuth Flow
3:00 - Google Cloud Console Setup
6:00 - Installing Dependencies
7:00 - Creating Google Strategy
11:00 - Auth Controller Setup

📦 WHAT YOU'LL LEARN:
✅ How OAuth 2.0 flow works
✅ Setting up Google Cloud Console
✅ Creating Passport Google Strategy
✅ Handling OAuth callbacks
✅ Find or create user pattern
✅ Generating JWT after OAuth

🛠️ TECH STACK:
NestJS • Passport.js • passport-google-oauth20 • JWT • TypeScript

📚 INSTALL:
npm install @nestjs/passport passport passport-google-oauth20
npm install -D @types/passport-google-oauth20

🔗 LINKS:
📁 GitHub: [REPO_LINK]
📖 Google Console: https://console.cloud.google.com

👍 LIKE & SUBSCRIBE for more NestJS tutorials!

#nestjs #googleoauth #passport #nodejs #typescript #authentication