OAuthConsent shows an empty permissions list when only offline_access is requested

Open Beginner friendly
#9,852 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
react, typescript

Research direction

Start in packages/ui/src/components/OAuthConsent/OAuthConsent.tsx and inspect how displayedScopes is filtered and how the permissions list group is rendered. Reproduce an authorization request with scope=offline_access only; done means the consent page no longer shows a blank permissions box, either by hiding the group or displaying the offline_access notice as a row.

Written by the indexing model from the issue text.

Description

Preliminary Checks
Reproduction

https://github.com/clerk/javascript/blob/main/packages/ui/src/components/OAuthConsent/OAuthConsent.tsx (any OAuth application; authorize with scope=offline_access only)

Publishable key

n/a — reproduces on any instance with a Clerk OAuth application

Description

<OAuthConsent /> renders the "This will allow {application} access to:" list group header even when the list is empty.

displayedScopes filters offline_access out (line ~152) and the scope is instead surfaced as the oauthConsent.offlineAccessNotice footer line. When an OAuth client requests only offline_access (Smithery's MCP connector does this against our server), the user sees the header over a blank box and nothing else in the permissions section. The only hint that anything was granted is the small footer sentence.

Steps:

  1. Register a Clerk OAuth application (we use it as the authorization server for a remote MCP server; scopes_supported advertises profile email offline_access).
  2. Start an authorization request with scope=offline_access and open the consent page.
  3. Observe: "This will allow X access to:" header, empty list, then Deny/Allow.

Expected: either hide the list group when displayedScopes is empty, or render a row for offline_access (e.g. the text now in offlineAccessNotice), so the permissions box is never blank.

Screenshot from our consent page (Clerk-hosted component, custom appearance only): header present, list empty, footer notice present.

Environment
@clerk/nextjs 7.9.x (packages/ui OAuthConsent), Next.js App Router, custom consent path configured under Configure → Paths; observed 2026-09-22 with Smithery's OAuth client (client_id https://connect.smithery.ai/.well-known/oauth-client, DCR).
Dominant language
TypeScript
Stars
1.8k
Forks
472
Avg merge
2d 15h
Merged PRs (30d)
193

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from clerk/javascript

All issues in clerk/javascript

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.