Skip to content

Add example: OAuth 2.0 integration with Express #89

Description

@aybanda

Summary

I'd like to add an OAuth 2.0 integration example for Express to complement the existing FastAPI OAuth 2.0 example (oauth2-with-fastapi).

Following the pattern from oauth2-with-fastapi, I'll implement:

  1. GET /login - Initiates OAuth 2.0 flow with state parameter for CSRF protection
  2. GET /callback - Handles OAuth callback, exchanges code for token, retrieves user info
  3. GET /api/user/{user_id} - Protected endpoint requiring OAuth authentication
  4. State Management - Secure state parameter handling
  5. Token Storage - Proper token handling (in-memory for demo, with notes for production)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions