Skip to content

Conversation

@TooAngel
Copy link
Owner

Summary

  • Add GET /api/auth/url?redirect_uri=<callback> - returns GitHub OAuth URL
  • Add POST /api/auth/callback - exchanges OAuth code for session, returns sessionId
  • Update integration pattern docs to describe API-based flow

This enables the webapp to handle the OAuth UX directly:

  1. Webapp calls /api/auth/url to get the GitHub OAuth URL
  2. Webapp redirects user to GitHub
  3. GitHub redirects back to webapp callback with code
  4. Webapp calls /api/auth/callback with code, receives sessionId
  5. Webapp sets sessionId as httpOnly cookie

Test plan

  • Test /api/auth/url returns valid OAuth URL with correct redirect_uri
  • Test /api/auth/callback exchanges code and returns sessionId
  • Test full OAuth flow with webapp integration

Add endpoints for webapp to handle GitHub OAuth without redirecting through core:
- GET /api/auth/url - returns GitHub OAuth URL with webapp callback
- POST /api/auth/callback - exchanges code for session, returns sessionId

This enables the webapp to control the OAuth UX while core handles
token exchange and session management.
@worlddriven
Copy link
Contributor

worlddriven bot commented Dec 23, 2025

🤖 Worlddriven Status

📊 Live Status Dashboard

🗓️ Merge Date: 2025-12-25 at 01:12:49 UTC (today)
📅 Started: 2025-12-23 at 06:15:59 UTC
Speed Factor: 0.18 (82% faster due to reviews)
Positive votes: 312/380 contribution weight (coefficient: 0.82)
📈 Base Merge Time: 10 days → Current: 2 days

🎯 Want to influence when this merges?

Your review matters! As a contributor to this project, your voice helps determine the merge timeline.

How to review:

  1. Check the changes
    Files changed

  2. Leave your review
    Review changes

Your options:

  • ✅ Agree & Speed Up: Approve Approving makes this merge faster
  • ❌ Disagree & Slow Down: Request changes Requesting changes delays the merge

💡 Pro tip: The more contributors who agree, the faster this gets merged!

📊 View detailed stats on the dashboard

📋 Recent Activity

2025-12-23, 06:16:07 - Pull request opened
2025-12-23, 06:16:08 - Pull request opened
2025-12-25, 01:51:18 - Pull request merged by worlddriven ✅


This comment is automatically updated by worlddriven

@worlddriven worlddriven bot merged commit a36e795 into master Dec 25, 2025
2 checks passed
@worlddriven worlddriven bot deleted the feat/webapp-oauth-api branch December 25, 2025 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants