feat(desktop): add GitHub OAuth and API-level token exchange

Merged
SA
1y ago
+1243-890

Summary

  • Add GitHub OAuth support alongside Google for desktop authentication
  • Implement JWT token exchange at API level with refresh token support
  • Route OAuth through web callbacks for consistent UX across providers
  • Update CI/CD workflows with OAuth environment variables

Changes

  • API routes: /api/auth/desktop/google, /api/auth/desktop/github, /api/auth/desktop/refresh
  • Web routes: OAuth callback handlers that redirect to API for token exchange
  • Desktop: Updated auth service to support both Google and GitHub providers
  • CI/CD: Added GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET to deploy workflows

Test plan

  • Test Google OAuth login from desktop app
  • Test GitHub OAuth login from desktop app
  • Verify token refresh works correctly
  • Deploy to preview environment and test

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added direct GitHub and Google OAuth authentication support for desktop applications.
    • Implemented automatic token refresh for maintaining user sessions.
  • Refactor

    • Redesigned desktop authentication flow for improved security and simplified token handling.
    • Updated OAuth credential management across deployment pipelines.
  • Chores

    • Updated environment variable schema validation.
    • Reorganized module exports for improved code structure.

✏️ Tip: You can customize this high-level summary in your review settings.