Skip to content

Update OAuth consent UI to handle OAuth 2.0 Auth Code + PKCE#13819

Merged
rickyrombo merged 2 commits into
mjp-oauth-standalonefrom
mjp-oauth-consent
Mar 9, 2026
Merged

Update OAuth consent UI to handle OAuth 2.0 Auth Code + PKCE#13819
rickyrombo merged 2 commits into
mjp-oauth-standalonefrom
mjp-oauth-consent

Conversation

@rickyrombo
Copy link
Copy Markdown
Contributor

No description provided.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 5, 2026

⚠️ No Changeset found

Latest commit: 809c217

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 accept client_id as an alias for api_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.

Comment thread packages/web/src/pages/oauth-login-page/hooks.ts
Comment thread packages/web/src/pages/oauth-login-page/hooks.ts
Comment thread packages/web/src/pages/oauth-login-page/utils.ts Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@rickyrombo rickyrombo merged commit 9535fc8 into mjp-oauth-standalone Mar 9, 2026
4 checks passed
@rickyrombo rickyrombo deleted the mjp-oauth-consent branch March 9, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants