[codex] Add emulated auth provider login buttons#3
Conversation
|
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (15)
📝 WalkthroughWalkthroughAdds a multi-provider OAuth login flow: a new ChangesOAuth Provider Login Feature
Sequence Diagram(s)sequenceDiagram
participant Browser
participant auth-login as auth-login (Netlify fn)
participant OAuthProvider as OAuth Provider / Emulator
participant auth-callback as auth-callback (Netlify fn)
Browser->>auth-login: GET /api/auth/login/:provider
auth-login->>auth-login: resolveOrigin, buildAuthorizationUrl, buildAuthState
auth-login-->>Browser: 302 → provider authorization URL
Browser->>OAuthProvider: GET authorization URL
OAuthProvider-->>Browser: redirect to /api/auth/callback/:provider?code=…
Browser->>auth-callback: GET /api/auth/callback/:provider?code=…
auth-callback->>auth-callback: providerFromPath, getAuthProvider, extract code
auth-callback-->>Browser: HTML confirmation page
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What changed
/loginpage with buttons for Microsoft Entra ID, Apple Sign In, Login with Google, Clerk, and Okta / Auth0./api/auth/login/:providerand/api/auth/callback/:provider; each login endpoint redirects to the matching emulated OAuth/OIDC authorization page.Validation
npm run checknpm run test -- tests/auth.spec.tsnpm run test -- tests/checkout.spec.tsCompanion change
Summary by CodeRabbit
New Features
Bug Fixes
Tests