Authorize page logged-in state#10
Merged
Merged
Conversation
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
|
Cursor Agent can help with this pull request. Just |
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
|
Bugbot Autofix prepared fixes for 1 of the 1 bugs found in the latest run.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable logged-in users to approve OAuth connections without re-entering credentials on the authorize page.
This improves user experience by displaying a signed-in banner and offering a direct "Approve connection" option when a session already exists, instead of prompting for re-login.
Note
Medium Risk
Changes the OAuth authorization approval path and relies on cookie-based session parsing, which could affect authorization behavior if session validation/env secrets are misconfigured.
Overview
The OAuth authorize flow now detects an existing signed-in session and lets users approve a connection without re-entering email/password, including updated UI states (session-checking banner, signed-in callout, and an "Approve connection" label).
On the worker side,
handleAuthorizeRequestaccepts approval when either valid form credentials are provided or a valid auth session cookie is present, and passes the session email through tocompleteAuthorization; tests and env setup were updated to cover the session-cookie approval path.Client session fetching logic was deduplicated into a new
client/session.tshelper and reused byAppand the authorize page.Written by Cursor Bugbot for commit 3d73686. This will update automatically on new commits. Configure here.