Update OAuth consent UI to handle OAuth 2.0 Auth Code + PKCE#13819
Conversation
|
There was a problem hiding this comment.
Pull request overview
Adds support to the OAuth consent/login UI for OAuth 2.0 Authorization Code + PKCE by parsing PKCE params, validating them, exchanging the existing signed JWT for an authorization code, and redirecting/postMessaging the code back to the client.
Changes:
- Add
exchangeForAuthorizationCode()helper to POST JWT + PKCE params to/v1/oauth/authorize. - Parse
response_type,code_challenge,code_challenge_method, and acceptclient_idas an alias forapi_key. - Add PKCE-specific query param validation + user-facing error messages.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/web/src/pages/oauth-login-page/utils.ts | Adds the JWT→auth-code exchange helper calling the backend OAuth authorize endpoint. |
| packages/web/src/pages/oauth-login-page/hooks.ts | Parses PKCE params, validates them, and adds an auth-code redirect/postMessage path when response_type=code. |
| packages/web/src/pages/oauth-login-page/messages.ts | Adds new PKCE validation error strings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.