Skip to content

Conversation

@jfoshee
Copy link
Contributor

@jfoshee jfoshee commented Jan 20, 2026

Description

This PR introduces special handling for the offline_access OAuth scope on the consent screen.

See discussion.

The offline_access scope is now:

  • Excluded from the list of displayed scopes, as it describes access duration rather than specific permissions.
  • Indicated by an additional sentence ("You’ll stay signed in until you sign out or revoke access.") appended to the redirect information text when present.

The sandbox environment has been updated to facilitate testing of these changes.

Part of USER-4333

With offline_access:
CleanShot 2026-01-20 at 16 19 37@2x

Without offline_access:
CleanShot 2026-01-20 at 16 20 01@2x

Sandbox demo URL:

http://localhost:4000/oauth-consent?
  scopes=email,profile,offline_access&
  oauth-application-name=My%20App&
  redirect_uri=https://example.com/callback&
  logo-url=https://example.com/logo.png&
  app-url=https://example.com

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Open in Cursor Open in Web

Summary by CodeRabbit

  • New Features

    • OAuth consent screen now shows per-permission descriptions and marks permissions that require explicit consent.
    • "Offline access" is omitted from the main permission list and instead triggers an informational note about staying signed in.
  • Chores

    • Release metadata updated for a minor UI release.

✏️ Tip: You can customize this high-level summary in your review settings.

- Filter out offline_access from displayed scopes list as it describes
  duration of access rather than what can be accessed
- When offline_access scope is present, append text after redirect info:
  'You'll stay signed in until you sign out or revoke access.'
- Update sandbox to include requires_consent property and handle
  offline_access description appropriately for testing

Part of [USER-4333](https://linear.app/clerk/issue/USER-4333/oauth-app-offline-access-scope-is-missing)
@cursor
Copy link

cursor bot commented Jan 20, 2026

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

@changeset-bot
Copy link

changeset-bot bot commented Jan 20, 2026

🦋 Changeset detected

Latest commit: c7b99fa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@clerk/ui Minor
@clerk/chrome-extension Patch

Not sure what this means? Click here to learn what changesets are.

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

@vercel
Copy link

vercel bot commented Jan 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jan 21, 2026 3:49pm

Request Review

@jfoshee jfoshee changed the title Offline access consent text feat(ui): Special handling of offline_access scope in OAuth Consent screen Jan 20, 2026
@jfoshee jfoshee marked this pull request as ready for review January 20, 2026 22:34
@jfoshee jfoshee requested a review from a team January 20, 2026 22:34
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

The pull request updates the OAuth consent flow: each scope now includes description and requires_consent fields (description is set to null for offline_access; requires_consent is true for all scopes). The UI filters offline_access from the displayed scope list, tracks its presence, and conditionally shows an informational note when offline_access is part of the OAuth request.

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main change: special handling for the offline_access scope in the OAuth Consent screen UI component.
Linked Issues check ✅ Passed The PR successfully addresses USER-4333 by adding offline_access scope handling, excluding it from the displayed scopes list, and appending contextual text about session duration.
Out of Scope Changes check ✅ Passed All changes are within scope: OAuth scopes mapping updates, OAuthConsent component filtering, changeset documentation, and bundle size threshold adjustments align with the offline_access handling objective.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Member

@jacekradko jacekradko left a comment

Choose a reason for hiding this comment

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

Looks good. We need to add some tests for the OAuthConsent component in the future though

@jfoshee
Copy link
Contributor Author

jfoshee commented Jan 21, 2026

We need to add some tests for the OAuthConsent component in the future though

Agree. Thanks @jacekradko

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 21, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7627

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7627

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7627

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7627

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7627

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7627

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@7627

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7627

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7627

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7627

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7627

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7627

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7627

@clerk/react

npm i https://pkg.pr.new/@clerk/react@7627

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7627

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7627

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7627

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7627

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@7627

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7627

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7627

commit: c7b99fa

@jfoshee
Copy link
Contributor Author

jfoshee commented Jan 21, 2026

@jacekradko I ran into ui bundlewatch limits. I ran bundlewatch:fix. It bumped by 2KB. Can you review if this is ok?
c7b99fa

@jfoshee jfoshee merged commit cd09a40 into main Jan 21, 2026
40 checks passed
@jfoshee jfoshee deleted the cursor/offline-access-consent-text-8be1 branch January 21, 2026 15:56
jfoshee added a commit that referenced this pull request Jan 21, 2026
…creen (#7627)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
jfoshee added a commit that referenced this pull request Jan 21, 2026
…creen (#7627)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
bratsos pushed a commit that referenced this pull request Jan 23, 2026
… screen (#7627)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants