hectoday
DocsCoursesChangelog GitHub
DocsCoursesChangelog GitHub

Access Required

Enter your access code to view courses.

Invalid code

← All courses

OAuth and Social Login

Learn how OAuth 2.0 works from scratch. The authorization code flow, GitHub and Google login, account linking, and production concerns — built with plain functions on Hectoday HTTP and Node.js.

Intermediate ~6 hours

Why OAuth?

  1. The Problem with Passwords
  2. OAuth 2.0 in Plain English
  3. The Authorization Code Flow, Step by Step
  4. Project Setup

GitHub Login

  1. Register a GitHub OAuth App
  2. The Authorization Redirect
  3. The State Parameter
  4. The Callback Handler
  5. Fetching the User Profile
  6. Creating or Linking Accounts
  7. The Complete Flow

Google Login

  1. Register a Google OAuth App
  2. Building Google Login

Production Concerns

  1. Multiple Providers, One User
  2. Combining OAuth with Password Auth
  3. Error Handling
  4. Logout and Token Cleanup
  5. Common Mistakes
  6. Capstone: Multi-Provider Login Page

© 2026 hectoday. All rights reserved.