In ProgressHigh Priority
Refactor OAuth2 authentication flow for enterprise SSO providers
Description
Currently, the authentication service handles SSO tokens synchronously, causing timeouts when enterprise providers (Okta, Azure AD) have high latency. We need to decouple the token validation process.
This task involves:
- Migrating the validation logic to a background worker queue.
- Implementing a polling mechanism for the frontend client.
- Updating the
UserSessionschema to support pending states.
Please ensure this is backward compatible with the existing JWT implementation.
Attachments (2)
auth_flow_diagram.mermaid
24 KB • Added yesterday
sso_error_screenshot.png
1.2 MB • Added yesterday
Activity Log
Alex Morgan linked pull request #842
2 hours agoDavid Kim4 hours ago
Looks good. I'd suggest we keep the timeout at 30s for the polling interval to avoid overloading the worker queue during peak times.
ME