feat(auth): auto-refresh OIDC tokens on session loss#1
Merged
Conversation
When the OIDC JWT strategy finds no usable id_token (missing from both the session and the openid_id_token cookie) but a refreshToken cookie exists, transparently call the IdP's refresh-token endpoint, repopulate the session, and continue the request. This addresses deployment-restart scenarios where the MemoryStore is wiped while the browser still holds a valid Bearer token. - Add refreshOpenIDTokensFromCookie helper in AuthService.js with dedup map - Wire helper into openIdJwtStrategy.js with fail-closed behavior - Add 11 helper tests and 4 strategy tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep only the workflows that validate fork-specific changes on PRs: - backend-review.yml (jest unit tests for api/packages) - eslint-ci.yml (lint changed files) - frontend-review.yml (jest unit tests for client) - docker-smoke.yml (verify Docker build still works) Removed: npm publishing, Docker registry pushes, Helm charts, i18n sync, GitNexus indexing, deployments, accessibility, Playwright E2E, and other upstream-only concerns. A custom registry push workflow will be added later. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Build and push container image to Azure Container Registry on merge to main or manual dispatch. Uses OIDC federation for auth with identifiers stored as repo variables (AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_SUBSCRIPTION_ID, ACR_NAME). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All PR test workflows now require the "test" label to be present before running. This prevents unnecessary CI spend on PRs that aren't ready for testing. Add the label when you want checks to run. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ingvarch
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
id_tokenbut arefreshTokencookie exists, transparently refresh tokens from the IdP and repopulate the session. Addresses deployment-restart scenarios where the MemoryStore is wiped while the browser still holds a valid Bearer token.Test plan
refreshOpenIDTokensFromCookiehelper tests pass (dedup, success/failure paths, edge cases)🤖 Generated with Claude Code