immich/packages
Mattia Bertorello 5ba3446fdf
fix(oauth): send and verify a nonce to tolerate IdP-injected nonces
Immich's OAuth flow never sent a `nonce`, so oauth4webapi's default
`expectNoNonce` rejected any id_token carrying one. Providers that inject a
nonce on federated logins (e.g. AWS Cognito relaying Google) therefore broke
with OAUTH_JWT_CLAIM_COMPARISON_FAILED: unexpected ID Token "nonce" claim.

Generate a real nonce in authorize(), round-trip it (web via httpOnly cookie,
mobile via the callback DTO since the client generates its own state/PKCE),
and pass it as expectedNonce to authorizationCodeGrant so the value is
verified per the OIDC spec.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-14 08:12:04 +02:00
..
cli chore: use import.meta.dirname instead of __dirname (#30738) 2026-08-12 18:01:30 +02:00
e2e-auth-server chore(deps): update node.js to v24.19.0 (#30703) 2026-08-11 12:27:42 +02:00
plugin-core feat: workflow asset tag trigger/filter/action (#29043) 2026-08-12 16:26:03 -07:00
plugin-sdk feat: workflow asset tag trigger/filter/action (#29043) 2026-08-12 16:26:03 -07:00
scripts feat: use version service for docs archive switcher (#30675) 2026-08-12 13:36:33 +02:00
sdk fix(oauth): send and verify a nonce to tolerate IdP-injected nonces 2026-08-14 08:12:04 +02:00