Repository navigation
Revert "Oauth refactor" - #506
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis PR refactors OAuth handling by replacing the generic Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Backend
participant AuthService
participant OAuthProvider
Note over Client,OAuthProvider: New OAuth Flow
Client->>Backend: POST /auth/oauth/{provider}/init<br/>(redirectUri)
Backend->>AuthService: Build provider state payload
Backend->>Backend: Sign JWT state (HS256, 1h)
Backend-->>Client: { authUrl }
Client->>OAuthProvider: Redirect to authUrl
OAuthProvider-->>Client: Redirect to /shared/callback/:state<br/>(with code/token)
Client->>Backend: GET /auth/oauth/shared/callback/:state
Backend->>Backend: Verify & extract state
Backend->>AuthService: Process provider-specific code/token
Backend->>Backend: Create/fetch user
Backend-->>Client: Redirect to redirectUri<br/>(+ accessToken, userInfo)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes This refactor spans multiple interconnected systems (backend routes, core auth logic, schemas, frontend components, and seeding utilities) with heterogeneous changes: OAuth flow restructuring, type narrowing from enum to union literals, database schema modifications (removing fields, changing constraints), and environment variable removal. Each area demands separate reasoning despite some repetitive type updates. Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (13)
Comment |
Reverts #505
Summary by CodeRabbit
Release Notes
New Features
Chores