Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/shared/src/lib/oauthApps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const OAUTH_SCOPES = [
'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.

];

export const MAX_OAUTH_APPS_PER_USER = 5;
Expand Down
1 change: 1 addition & 0 deletions packages/webapp/components/settings/OAuthApps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const OAUTH_REDIRECT_URIS_MAX_LENGTH = 2000;
const scopeLabels: Record<string, string> = {
read: 'Read',
write: 'Write',
reading_history: 'Reading history',
};

const formatRelative = (value: Date): string =>
Expand Down
8 changes: 6 additions & 2 deletions packages/webapp/pages/oauth/consent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
import { Checkbox } from '@dailydotdev/shared/src/components/fields/Checkbox';
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.


const scopeDescriptions: Record<string, string> = {
openid: 'Know who you are on daily.dev',
Expand All @@ -31,6 +31,8 @@ const scopeDescriptions: Record<string, string> = {
read: 'Read content on daily.dev, like feeds, posts, comments and search, and your personal data: profile, bookmarks, custom feeds, followed and blocked tags and sources, notifications, tech stack and experiences',
write:
'Make changes on your behalf, like bookmarking posts and updating your feed settings',
reading_history:
"See the posts you've read on daily.dev and search your reading history",
};

const getUrlHost = (value?: string): string | null => {
Expand All @@ -49,7 +51,9 @@ const OAuthConsentPage = (): ReactElement => {
const { query } = useRouter();
const { showLogin, user, isAuthReady } = useAuthContext();
const [isSubmitting, setIsSubmitting] = useState(false);
const [declinedScopes, setDeclinedScopes] = useState<string[]>([]);
const [declinedScopes, setDeclinedScopes] = useState<string[]>([
'reading_history',
]);
const [consentError, setConsentError] = useState<string>();
const clientId = getFirstQueryParam(query.client_id);
const requestedScopes = (getFirstQueryParam(query.scope) ?? '')
Expand Down
Loading