From 4b4244cd1c461ecb27c793620e968c4d94318c1e Mon Sep 17 00:00:00 2001 From: Jamie Ruderman Date: Fri, 18 Sep 2026 10:10:19 -0700 Subject: [PATCH] feat(auth): the authorize request carries the app's language as ui_locales --- frontend/src/services/oidc.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/services/oidc.ts b/frontend/src/services/oidc.ts index 66d006222..5137a3373 100644 --- a/frontend/src/services/oidc.ts +++ b/frontend/src/services/oidc.ts @@ -1,4 +1,5 @@ import browser from './browser' +import i18n from '../i18n' import { OAUTH_ISSUER, OAUTH_CLIENT_ID, OAUTH_GRAPHQL_RESOURCE, OAUTH_PASSPORT_RESOURCE, OAUTH_MCP_RESOURCE, OAUTH_MCP_DETAIL, OAUTH_AGENT_ACTOR, PROTOCOL } from '../constants' /** @@ -405,6 +406,9 @@ export async function oidcStart(opts: { prompt?: 'login' | 'select_account' | 'n authorization_details: JSON.stringify(declared().map(d => ({ type: d.type, actions: d.actions, ...(d.locations ? { locations: d.locations } : {}), ...(d.actor ? { actor: d.actor } : {}) }))), state: flow.state, nonce: flow.nonce, + // The language this app is showing: the sign-in renders in it, and — because the app + // asked rather than the AS guessing from Accept-Language — offers no language picker. + ui_locales: i18n.resolvedLanguage ?? i18n.language, } // Naming WHO is signing in turns a step-up into "confirm it's you" rather than an account // chooser — without it, prompt=login lands on the picker and choosing your own account