Skip to content

Add Feast API scopes for "Saved from web" endpoints#2428

Open
andresilva-guardian wants to merge 1 commit into
mainfrom
afs/feature/feast-saved-from-web-endpoint-scopes
Open

Add Feast API scopes for "Saved from web" endpoints#2428
andresilva-guardian wants to merge 1 commit into
mainfrom
afs/feature/feast-saved-from-web-endpoint-scopes

Conversation

@andresilva-guardian

@andresilva-guardian andresilva-guardian commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

What are you changing?

  • We added two new OAuth scopes to the scopes array in getIdentityAuth() in index.ts, guardian.feast-api.saved-from-web.update.self and guardian.feast-api.saved-from-web.read.self, each with an inline comment explaining what it grants
  • We kept every existing scope in place, unchanged and in the same order
  • We added a changeset, moody-seas-sing.md, marking this as a minor version bump for @guardian/identity-auth-frontend
  • We ran the package's existing test suite to confirm nothing else broke

Why?

  • Dotcom-rendering, and any other consumer of @guardian/identity-auth-frontend, needs to request access tokens that are valid for the new "Saved from web" endpoints on the Feast API, added in personalised-app-experience#256
  • PUT /v2/saved-from-web/{recipeId} requires the guardian.feast-api.saved-from-web.update.self scope, and GET /v2/saved-from-web/{recipeId} requires the guardian.feast-api.saved-from-web.read.self scope
  • These scopes have already been added to the "theguardian" Okta OAuth client in the identity-platform repo's Okta Terraform, so Okta will allow them to be requested, and consent is implicit, so we don't need any consent screen or UI changes
  • We are keeping these scopes in the single global scopes array, consistent with how every other scope in this list is handled today, since this package doesn't support per-feature or per-call scoping

@changeset-bot

changeset-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 840eda5

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

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

@github-actions

Copy link
Copy Markdown
Contributor

Tip

Once this PR is ready to go, add the run_chromatic label to run the Chromatic tests.

This saves us a lot of money by not running the tests before we need them.

@github-actions github-actions Bot added the 📦 npm Affects a @guardian package on NPM label Jul 15, 2026
@andresilva-guardian andresilva-guardian added the feature Departmental tracking: work on a new feature label Jul 15, 2026
@andresilva-guardian
andresilva-guardian marked this pull request as ready for review July 15, 2026 10:57
@andresilva-guardian
andresilva-guardian requested review from a team as code owners July 15, 2026 10:57
@andresilva-guardian andresilva-guardian added the run_chromatic Runs chromatic when label is applied label Jul 16, 2026
@AshCorr

AshCorr commented Jul 16, 2026

Copy link
Copy Markdown
Member

We ran the package's existing test suite to confirm nothing else broke

Not entirely sure the packages test suite is broad enough to verify the interaction between DCR <-> @guardian/identity-auth <-> Gateway

Might be worth doing a pre-release by adding the "🐥 Canaries" label to this PR, so you can test this change in DCR CODE? I'm not entirely sure how @guardian/identity-auth behaves when a new scope is added, it shouldn't break, but I'm slightly worried about it signing users out who are missing the scope resulting in everyone getting signed out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature 📦 npm Affects a @guardian package on NPM run_chromatic Runs chromatic when label is applied

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants