Skip to content

feat(oauth): reading_history scope on the consent page and API settings - #7325

Open
capJavert wants to merge 3 commits into
mainfrom
public-api-reading-history
Open

capJavert wants to merge 3 commits into
mainfrom
public-api-reading-history

Conversation

@capJavert

@capJavert capJavert commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Adds the new optional reading_history OAuth scope to the consent page (description + optional checkbox, ticked by default like write) and to the scope list on settings/api.

Merge before the daily-api PR. The consent page hides scopes it doesn't know but still grants them, so if daily-api shipped first users would grant reading_history without seeing it.

🤖 Generated with Claude Code

Preview domain

https://public-api-reading-history.preview.app.daily.dev

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
daily-webapp Ready Ready Preview Nov 13, 2026 2:32pm UTC
storybook Ready Ready Preview Nov 13, 2026 2:32pm UTC

Request Review

@capJavert capJavert left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed alongside daily-api#4572 and daily#2182.

  • Merge order holds. The consent page lists only scopes it has a description for. When nothing is unticked it posts no scope, so the server grants everything the client asked for, hidden ones included. reading_history therefore has to be known here before the API advertises it. The API PR should wait for this to be deployed, not only merged.
  • Follow-up (non-blocking): the page could fail closed, so the next scope doesn't need the same merge order. For example, always post scope with only the scopes it showed and the user kept (grantedScopes.filter((scope) => scopeDescriptions[scope])), or disable Allow when the request has a scope the page can't describe.
  • CI: test_webapp fails on __tests__/BookmarksPage.tsx, which this PR doesn't touch. The same test fails on main at d5e6af0.

Reviewed by AI.

'offline_access',
'read',
'write',
'reading_history',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Blocking (one-line fix): the new scope is missing from scopeLabels in packages/webapp/components/settings/OAuthApps.tsx, which only labels read and write. The Connected apps list builds each app's scope summary from that map and drops any scope without a label, so an app granted reading history still shows only "Read, Write". Users review and revoke access on that page, so it should show this scope. Please add a label in this PR, e.g. reading_history: 'Reading history'.

Reviewed by AI.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 9292fb9: scopeLabels now has reading_history: 'Reading history', so Connected apps shows it.

import { noindexSeoProps } from '../../next-seo';

const OPTIONAL_SCOPES = ['write', 'offline_access'];
const OPTIONAL_SCOPES = ['write', 'reading_history', 'offline_access'];

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Question: reading_history starts ticked, like every optional scope, because declinedScopes starts empty. With daily-api#4572, the MCP challenge and scopes_supported include reading_history, so every new MCP or OAuth connection will ask for it. Most users will grant it just by leaving the box ticked. The read description deliberately lists the personal data it covers and leaves reading history out, so this is the most sensitive optional scope. Is opt-out intended? If it should be opt-in, a small change here is to start with it declined (useState<string[]>(['reading_history'])).

Reviewed by AI.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Made it opt-in in 9292fb9: declinedScopes now starts as ['reading_history'], so the box starts unticked. write and offline_access still start ticked.

@capJavert

Copy link
Copy Markdown
Contributor Author

Review round 1 addressed in 9292fb9 (scope label, reading_history starts unticked). Merged main in to pick up the BookmarksPage fix. The fail-closed consent idea is noted but out of scope for this PR.

This branch was successfully deployed

2 active deployments
Preview – daily-webapp — 9292fb93 Deployed Nov 13, 2026 by vercel[bot]
Preview – storybook — 9292fb93 Deployed Nov 13, 2026 by vercel[bot]
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.

1 participant