Skip to content

Authorize page logged-in state#10

Merged
kentcdodds merged 2 commits into
mainfrom
cursor/authorize-page-logged-in-state-54ee
Feb 7, 2026
Merged

Authorize page logged-in state#10
kentcdodds merged 2 commits into
mainfrom
cursor/authorize-page-logged-in-state-54ee

Conversation

@kentcdodds

@kentcdodds kentcdodds commented Feb 7, 2026

Copy link
Copy Markdown
Member

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.


Open in Cursor Open in Web


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, handleAuthorizeRequest accepts approval when either valid form credentials are provided or a valid auth session cookie is present, and passes the session email through to completeAuthorization; tests and env setup were updated to cover the session-cookie approval path.

Client session fetching logic was deduplicated into a new client/session.ts helper and reused by App and the authorize page.

Written by Cursor Bugbot for commit 3d73686. This will update automatically on new commits. Configure here.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@cursor

cursor Bot commented Feb 7, 2026

Copy link
Copy Markdown

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@kentcdodds kentcdodds marked this pull request as ready for review February 7, 2026 07:33

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is ON. A Cloud Agent has been kicked off to fix the reported issue.

Comment thread client/client-routes.tsx
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@cursor

cursor Bot commented Feb 7, 2026

Copy link
Copy Markdown

Bugbot Autofix prepared fixes for 1 of the 1 bugs found in the latest run.

  • ✅ Fixed: Duplicated session-loading logic across two components
    • Extracted shared session types and fetch logic into a helper used by both components to remove duplication and keep behavior consistent.

@kentcdodds kentcdodds merged commit 89610d6 into main Feb 7, 2026
7 checks passed
@kentcdodds kentcdodds deleted the cursor/authorize-page-logged-in-state-54ee branch February 7, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants