Skip to content

fix: rp-initiated logout & authorize hardening (plan 041 audit follow-ups) - #3197

Merged
tada5hi merged 3 commits into
masterfrom
fix/plan-041-audit-followups
Jul 8, 2026
Merged

tada5hi merged 3 commits into
masterfrom
fix/plan-041-audit-followups

Conversation

@tada5hi

@tada5hi tada5hi commented Jul 7, 2026 •

Copy link
Copy Markdown
Collaborator

Post-merge fixes for defects and test gaps surfaced by an audit of plan 041 (#3194 / #3195 / #3196). Closes plan 042 items #1, #11, and most of #12. No breaking API changes; all changes are server-authoritative fixes with kit/UX follow-through.

Security / correctness

  • Forced-logout CSRF (medium). AEndSessionForm auto-cleared local state on any serverRevoked, so a cross-site GET /logout?id_token_hint=<attacker's own id_token> (which revokes the attacker's own session → serverRevoked=true) force-logged-out any victim who merely rendered the page (store.logout() is local-only, so it acts on whoever's browser rendered it). Now gated on serverRevoked && hintSub === store.user.id; the controller forwards hintSub (verified hints only) into the payload.
  • Silent no-op logout (medium). LogoutController redirected whenever post_logout_redirect_uri validated, regardless of whether a session was revoked — a hint-less RP round-trip 302'd back while the authup session survived. The server-side bounce now fires only when serverRevoked && redirect; otherwise the validated redirect is threaded into the render payload and the click-gated AEndSessionForm performs the bearer-authenticated sign-out, then navigates to it.
  • prompt=select_account after fresh login (medium UX). A just-completed credential entry no longer re-prompts "Continue as X" (LoginForm's done sets accountConfirmed); the chooser also waits for the store user to resolve (no "Continue as <empty>" flash).
  • Anonymous /authorize over-disclosure (low). serve() now ships a ClientSummary DTO (id/name/display_name/built_in/created_at) — never redirect_uri patterns (the trusted-origin set), grant_types, internal URLs, or secret storage flags.
  • prompt=none (low). Removed from discovery prompt_values_supported + docs — the silent-auth error redirect is unimplemented, so advertising it promised a capability the server lacks.
  • max_age= empty (low). Treated as absent instead of coercing to 0 (z.coerce.number('') === 0 would silently force re-authentication).
  • "Signed in as X — Not you?" switch chip on the manual consent screen (+ i18n ×4 locales); removed the dead OAuth2AuthorizationCode.auth_time field; replaced hardcoded prompt/error literals with @authup/specs enums.

Tests (backfill of the plan's load-bearing matrix)

  • /logout HTTP e2e (logout/end-session.spec.ts): verified-hint revoke, verified-hint+redirect 302 w/ state, hint-less no-op renders page, access-token-as-hint no-revoke, forged-hint no-revoke, unregistered post_logout_redirect_uri dropped, discovery reachable.
  • server-kit ignoreExpiry: expired-but-valid-signature accepted; bad signature and nbf still rejected.
  • auth_time passthrough (open-id issuer) + auth_time ≠ refreshed_at pin (authorization module); redirectUriVerified (code-request verifier); confidential refresh exemption; cross-realm login_required no-identity-oracle body; clickjacking headers + trimmed-DTO assertions (ui-pages.spec.ts); max_age empty-vs-0; AEndSessionForm hint-sub gate (kit).

Docs

.agents/architecture.md (logout redirect/gate, hydration DTO, prompt=none non-advertisement, fresh-login chooser + switch chip), docs/api-oauth2.md, and status annotations on .agents/plans/042.

Verification

Full build (22 projects), lint, check:types, and suites green: server-kit 13, i18n 77, client-web-kit 15, server-core 1152/1153. The one failure is session.spec.ts (counts the admin's own sessions; races with parallel suites doing admin logins in the shared DB) — pre-existing flakiness, deterministic 6/6 in isolation.

Deliberate scope note

An HTTP e2e for realm-gate layer 2 (cross-realm code → /token invalid_grant, pinning the realmId: client.realm_id wiring) is not included: it is unreachable via the public authorize API now that layer 1 blocks cross-realm issuance, so it needs an IdP-callback harness. The verifier's realm semantics are already unit-tested. Tracked in plan 042 #12.

Summary by CodeRabbit

  • New Features
    • Added an identity switch experience during authorization with “Signed in as …” and “Not you?”.
    • Enhanced logout with optional post-logout navigation back to a validated redirect.
  • Bug Fixes
    • Improved max_age handling so empty values are treated as unset.
    • Tightened prompt/metadata behavior by no longer advertising silent login (prompt=none).
    • Prevented unintended logout redirects and tightened local sign-out cleanup to the correct session.
  • Documentation
    • Updated OAuth/OIDC guide to reflect current prompt support and interactive behavior.

…-ups)

Post-merge fixes for defects and test gaps surfaced by an audit of plan 041
(#3194/#3195/#3196). Closes plan 042 items #1, #11 and most of #12.

Security / correctness:
- AEndSessionForm gates its on-mount local sign-out on
  `serverRevoked && hintSub === store.user.id` — a cross-site
  /logout?id_token_hint=<attacker's own token> can no longer force-log-out an
  unrelated victim who merely renders the page (forced-logout CSRF). The
  controller forwards `hintSub` (verified hints only) into the payload.
- LogoutController bounces back to the RP only when the logout was actually
  performed (serverRevoked && validated redirect). A hint-less or forged
  request renders the click-gated confirm page and redirects after sign-out,
  instead of 302-ing back while the session survives.
- Authorize.vue: a fresh login no longer re-prompts prompt=select_account
  (LoginForm `done` sets accountConfirmed), and the chooser waits for `user`
  to resolve (no empty-name flash).
- /authorize hydration payload trimmed to a ClientSummary DTO (no redirect_uri
  patterns, grant_types, internal URLs, secret flags).
- prompt=none removed from discovery prompt_values_supported + docs (its
  silent-auth error redirect is unimplemented).
- empty `max_age=` is treated as absent instead of coercing to 0
  (z.coerce.number('') === 0 would force re-authentication).
- AuthorizeForm renders a "Signed in as X - Not you?" switch chip (+ i18n).
- Remove the dead OAuth2AuthorizationCode.auth_time field; use specs enums for
  prompt/error string comparisons instead of literals.

Tests:
- /logout HTTP e2e matrix (revoke, redirect+state, hint-less no-op,
  access-token/forged hint no-revoke, unregistered redirect dropped).
- server-kit ignoreExpiry (expired+valid-sig accepted; bad-sig/nbf rejected).
- auth_time passthrough + auth_time!=refreshed_at pins; redirectUriVerified;
  confidential refresh exemption; cross-realm login_required no-identity-oracle
  body; clickjacking headers + trimmed-DTO; max_age empty-vs-0; kit gate spec.
Copilot AI review requested due to automatic review settings July 7, 2026 20:49
@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@tada5hi, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 22 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 11daa977-f124-4930-b315-bde7ddd4e7d9

📥 Commits

Reviewing files that changed from the base of the PR and between ad9d8cc and a5c2856.

📒 Files selected for processing (2)
  • packages/client-web-kit/src/components/workflows/authorize/Authorize.vue
  • packages/client-web-kit/test/unit/components/workflows/authorize.spec.ts
📝 Walkthrough

Walkthrough

OIDC discovery, authorize/logout flows, and related client UI are updated to narrow exposed data, adjust logout redirect behavior, add subject-checked sign-out handling, and refine max_age, auth_time, and JWT verification coverage.

Changes

OIDC/logout security hardening and account-switch UI

Layer / File(s) Summary
Remove prompt=none advertisement
apps/server-core/src/adapters/http/controllers/entities/realm/module.ts, apps/server-core/test/unit/http/controllers/entities/realm-openid.spec.ts, docs/src/guide/development/api-oauth2.md, .agents/architecture.md
Discovery no longer lists prompt=none, with docs and tests updated to match.
Trim authorize SSR client payload
apps/server-core/src/adapters/http/controllers/workflows/authorize/module.ts, apps/server-core/test/unit/http/controllers/workflows/ui-pages.spec.ts
The authorize hydration payload now uses a trimmed client DTO, and tests assert sensitive client fields are omitted.
Gate logout redirect on revocation
apps/server-core/src/adapters/http/controllers/workflows/logout/module.ts, apps/server-core/test/utils/http.ts, apps/server-core/test/unit/http/controllers/workflows/logout/end-session.spec.ts
Logout only redirects after server-side revocation; otherwise it renders UI with a validated redirect. Tests cover revocation, redirect validation, and discovery.
Add subject-checked logout and account switch
apps/server-core/ui/src/pages/logout.vue, packages/client-web-kit/src/components/workflows/end-session/AEndSessionForm.vue, packages/client-web-kit/src/components/workflows/authorize/Authorize.vue, packages/client-web-kit/src/components/workflows/authorize/AuthorizeForm.vue, packages/i18n/src/catalogs/*/client.ts, packages/i18n/src/constants.ts, packages/client-web-kit/test/unit/components/workflows/end-session.spec.ts
Logout props and cleanup are subject-checked, and authorize UI adds enum-based select-account handling plus a signed-in-as switch affordance with new translation keys.
max_age and auth_time semantics
apps/server-core/src/core/oauth2/authorization/code-request/validator.ts, apps/server-core/test/unit/core/oauth2/**, packages/core-kit/src/domains/authorization-code/entity.ts
Blank max_age is treated as absent, auth_time is removed from the authorization-code entity, and tests cover prompt/login, cross-realm error bodies, refresh behavior, and token issuer auth_time handling.
JWT ignoreExpiry coverage
packages/server-kit/test/unit/json-web-token.spec.ts
JWT verification tests now cover expired tokens under ignoreExpiry and confirm signature and nbf checks still apply.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant RP
  participant LogoutController
  participant AEndSessionForm
  participant Store

  RP->>LogoutController: GET /logout with id_token_hint
  LogoutController->>LogoutController: validate hint and build redirect
  alt serverRevoked
    LogoutController-->>RP: 302 redirect to validated redirect
  else not revoked
    LogoutController-->>AEndSessionForm: render UI with redirect and hintSub
    AEndSessionForm->>Store: logout() when subject matches current user
    AEndSessionForm->>RP: navigate to redirect
  end
Loading

Possibly related PRs

  • authup/authup#3175: Also touches client-side realm handling in the authorize flow.
  • authup/authup#3194: Overlaps with authorize SSR payload and clickjacking/header-related controller work.
  • authup/authup#3196: Directly overlaps with the logout/end-session flow and redirect handling.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is specific and accurately reflects the main logout and authorize hardening work in this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/plan-041-audit-followups

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

authup

npm i https://pkg.pr.new/authup@3197

@authup/client-web

npm i https://pkg.pr.new/@authup/client-web@3197

@authup/server-core

npm i https://pkg.pr.new/@authup/server-core@3197

@authup/access

npm i https://pkg.pr.new/@authup/access@3197

@authup/client-web-kit

npm i https://pkg.pr.new/@authup/client-web-kit@3197

@authup/client-web-kit-theme

npm i https://pkg.pr.new/@authup/client-web-kit-theme@3197

@authup/client-web-nuxt

npm i https://pkg.pr.new/@authup/client-web-nuxt@3197

@authup/client-web-theme

npm i https://pkg.pr.new/@authup/client-web-theme@3197

@authup/core-http-kit

npm i https://pkg.pr.new/@authup/core-http-kit@3197

@authup/core-kit

npm i https://pkg.pr.new/@authup/core-kit@3197

@authup/core-realtime-kit

npm i https://pkg.pr.new/@authup/core-realtime-kit@3197

@authup/errors

npm i https://pkg.pr.new/@authup/errors@3197

@authup/i18n

npm i https://pkg.pr.new/@authup/i18n@3197

@authup/kit

npm i https://pkg.pr.new/@authup/kit@3197

@authup/server-adapter-kit

npm i https://pkg.pr.new/@authup/server-adapter-kit@3197

@authup/server-adapter-node

npm i https://pkg.pr.new/@authup/server-adapter-node@3197

@authup/server-adapter-socket-io

npm i https://pkg.pr.new/@authup/server-adapter-socket-io@3197

@authup/server-adapter-web

npm i https://pkg.pr.new/@authup/server-adapter-web@3197

@authup/server-kit

npm i https://pkg.pr.new/@authup/server-kit@3197

@authup/server-test-kit

npm i https://pkg.pr.new/@authup/server-test-kit@3197

@authup/specs

npm i https://pkg.pr.new/@authup/specs@3197

commit: a5c2856

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR applies post-audit hardening and correctness fixes around OIDC RP-initiated logout (/logout) and the hosted /authorize UX/data surface, with accompanying test backfills, i18n updates, and documentation updates to match the server’s actual capabilities (notably prompt=none).

Changes:

  • Harden RP-initiated logout: prevent silent no-op redirects, thread validated redirects to the click-gated UI, and gate any auto-local cleanup on verified subject match.
  • Reduce anonymous /authorize hydration exposure by trimming the client payload to a minimal DTO; align discovery/docs with supported prompt values and handle blank max_age=.
  • Add/extend unit + e2e coverage across logout, token verification (ignoreExpiry), auth-time semantics, redirect verification, and realm/identity leakage constraints.

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/server-kit/test/unit/json-web-token.spec.ts Adds coverage for ignoreExpiry behavior (expired ok, bad signature/nbf still rejected).
packages/i18n/src/constants.ts Introduces new client translation keys for “Signed in as” and “Not you?”.
packages/i18n/src/catalogs/fr/client.ts Adds French strings for the new account-switch chip.
packages/i18n/src/catalogs/es/client.ts Adds Spanish strings for the new account-switch chip.
packages/i18n/src/catalogs/en/client.ts Adds English strings for the new account-switch chip.
packages/i18n/src/catalogs/de/client.ts Adds German strings for the new account-switch chip.
packages/core-kit/src/domains/authorization-code/entity.ts Removes the auth_time field from the authorization-code entity interface.
packages/client-web-kit/test/unit/components/workflows/end-session.spec.ts Adds unit tests for the logout form’s auto-cleanup gate keyed by hintSub.
packages/client-web-kit/src/components/workflows/end-session/AEndSessionForm.vue Adds hintSub/redirect props, gated auto sign-out, and redirect navigation after logout.
packages/client-web-kit/src/components/workflows/authorize/AuthorizeForm.vue Uses @authup/specs enums, adds “Signed in as … Not you?” switch affordance, emits switch.
packages/client-web-kit/src/components/workflows/authorize/Authorize.vue Avoids re-prompt after fresh login; waits for user resolution before select-account chooser; wires switch flow.
docs/src/guide/development/api-oauth2.md Updates docs to stop advertising prompt=none as implemented; clarifies current behavior.
apps/server-core/ui/src/pages/logout.vue Threads hintSub and validated redirect from SSR payload into AEndSessionForm.
apps/server-core/test/utils/http.ts Extends HTTP test helper to support manual redirect handling.
apps/server-core/test/unit/http/controllers/workflows/ui-pages.spec.ts Asserts clickjacking headers and trimmed client DTO fields in SSR hydration.
apps/server-core/test/unit/http/controllers/workflows/token/grant-refresh-token.spec.ts Adds control test for confidential-client cross-realm refresh exemption.
apps/server-core/test/unit/http/controllers/workflows/token/grant-authorize.spec.ts Adds test ensuring cross-realm login_required body does not leak identity/realm data.
apps/server-core/test/unit/http/controllers/workflows/logout/end-session.spec.ts Adds /logout HTTP e2e matrix for verified/forged hints and redirect behavior.
apps/server-core/test/unit/http/controllers/entities/realm-openid.spec.ts Updates discovery test: removes none from prompt_values_supported.
apps/server-core/test/unit/core/oauth2/token/issuer/open-id/module.spec.ts Pins auth_time passthrough (not overwritten by issuance time).
apps/server-core/test/unit/core/oauth2/authorization/module.spec.ts Pins auth_time sourcing from created_at (not refreshed_at).
apps/server-core/test/unit/core/oauth2/authorization/code-request/verifier/module.spec.ts Adds redirectUriVerified tests for pattern-less vs pattern-matching clients.
apps/server-core/test/unit/core/oauth2/authorization/code-request/validator.spec.ts Adds tests for max_age=0 and blank max_age= semantics.
apps/server-core/src/core/oauth2/authorization/code-request/validator.ts Treats blank max_age= as absent via preprocess (avoids coercion to 0).
apps/server-core/src/adapters/http/controllers/workflows/logout/module.ts Redirects only when server actually revoked; otherwise threads validated redirect into payload.
apps/server-core/src/adapters/http/controllers/workflows/authorize/module.ts Trims anonymous SSR client payload to ClientSummary DTO; keeps realm summary separate.
apps/server-core/src/adapters/http/controllers/entities/realm/module.ts Stops advertising prompt=none in discovery; documents rationale inline.
.agents/architecture.md Updates architecture notes for logout/authorize hardening, DTO trimming, prompt handling, and redirect gating.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (2)
packages/server-kit/test/unit/json-web-token.spec.ts (1)

110-126: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider asserting the specific error variant.

Other tests in this file (lines 90, 141) assert a specific JWTError variant (e.g., JWTError.expired(), JWTError.notActiveBefore()). Per the createErrorForJWTError mapping, an invalid signature resolves to JWTError.payloadInvalid(). Asserting the generic JWTError base class here is looser than the sibling tests and could mask a regression where signature failures start throwing a different error type.

♻️ Suggested tightening
         await expect(async () => {
             await verifyToken(signedText, {
                 type: 'rsa',
                 key: otherKeyPair.publicKey,
             }, { ignoreExpiry: true });
-        }).rejects.toThrow(JWTError);
+        }).rejects.toThrow(JWTError.payloadInvalid());
     });
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/server-kit/test/unit/json-web-token.spec.ts` around lines 110 - 126,
Tighten the invalid-signature test in json-web-token.spec.ts by asserting the
specific JWTError variant instead of the base JWTError class. Update the test
around verifyToken and JWTError so it expects JWTError.payloadInvalid(),
matching the createErrorForJWTError mapping and the style used by the other
JWTError variant assertions in this file.
packages/client-web-kit/src/components/workflows/authorize/AuthorizeForm.vue (1)

268-279: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Prefer a <button> (or role="button") for the account-switch control.

"Not you?" performs an in-page action rather than navigation, so <a href="#"> mislabels it as a link for assistive tech. A button-styled control conveys the correct semantics.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/client-web-kit/src/components/workflows/authorize/AuthorizeForm.vue`
around lines 268 - 279, The account-switch control in AuthorizeForm.vue is using
a link for an in-page action, which gives it the wrong semantics. Update the Not
you? control in the identityName block to use a button-style interactive element
(or add an appropriate button role if you must keep the tag) and keep the
switchAccount click handler behavior unchanged. Use the signedInAsLabel /
notYouLabel section and the switchAccount method as the locator for this change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@packages/client-web-kit/src/components/workflows/authorize/AuthorizeForm.vue`:
- Around line 268-279: The account-switch control in AuthorizeForm.vue is using
a link for an in-page action, which gives it the wrong semantics. Update the Not
you? control in the identityName block to use a button-style interactive element
(or add an appropriate button role if you must keep the tag) and keep the
switchAccount click handler behavior unchanged. Use the signedInAsLabel /
notYouLabel section and the switchAccount method as the locator for this change.

In `@packages/server-kit/test/unit/json-web-token.spec.ts`:
- Around line 110-126: Tighten the invalid-signature test in
json-web-token.spec.ts by asserting the specific JWTError variant instead of the
base JWTError class. Update the test around verifyToken and JWTError so it
expects JWTError.payloadInvalid(), matching the createErrorForJWTError mapping
and the style used by the other JWTError variant assertions in this file.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: adfe4009-3249-4ee6-bc2c-2f1e80dffdb4

📥 Commits

Reviewing files that changed from the base of the PR and between 865520c and 9849cb2.

📒 Files selected for processing (28)
  • .agents/architecture.md
  • apps/server-core/src/adapters/http/controllers/entities/realm/module.ts
  • apps/server-core/src/adapters/http/controllers/workflows/authorize/module.ts
  • apps/server-core/src/adapters/http/controllers/workflows/logout/module.ts
  • apps/server-core/src/core/oauth2/authorization/code-request/validator.ts
  • apps/server-core/test/unit/core/oauth2/authorization/code-request/validator.spec.ts
  • apps/server-core/test/unit/core/oauth2/authorization/code-request/verifier/module.spec.ts
  • apps/server-core/test/unit/core/oauth2/authorization/module.spec.ts
  • apps/server-core/test/unit/core/oauth2/token/issuer/open-id/module.spec.ts
  • apps/server-core/test/unit/http/controllers/entities/realm-openid.spec.ts
  • apps/server-core/test/unit/http/controllers/workflows/logout/end-session.spec.ts
  • apps/server-core/test/unit/http/controllers/workflows/token/grant-authorize.spec.ts
  • apps/server-core/test/unit/http/controllers/workflows/token/grant-refresh-token.spec.ts
  • apps/server-core/test/unit/http/controllers/workflows/ui-pages.spec.ts
  • apps/server-core/test/utils/http.ts
  • apps/server-core/ui/src/pages/logout.vue
  • docs/src/guide/development/api-oauth2.md
  • packages/client-web-kit/src/components/workflows/authorize/Authorize.vue
  • packages/client-web-kit/src/components/workflows/authorize/AuthorizeForm.vue
  • packages/client-web-kit/src/components/workflows/end-session/AEndSessionForm.vue
  • packages/client-web-kit/test/unit/components/workflows/end-session.spec.ts
  • packages/core-kit/src/domains/authorization-code/entity.ts
  • packages/i18n/src/catalogs/de/client.ts
  • packages/i18n/src/catalogs/en/client.ts
  • packages/i18n/src/catalogs/es/client.ts
  • packages/i18n/src/catalogs/fr/client.ts
  • packages/i18n/src/constants.ts
  • packages/server-kit/test/unit/json-web-token.spec.ts
💤 Files with no reviewable changes (1)
  • packages/core-kit/src/domains/authorization-code/entity.ts

The account-switch affordance is an action, not navigation — render it as a
<button type="button"> styled like a link instead of an <a href="#"> so it has
correct button semantics and keyboard behavior (Enter/Space activation), and
matches the rest of the form's actions.
@tada5hi

tada5hi commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai pause

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown
✅ Action performed

Reviews paused.

The prompt=select_account chooser reappeared right after entering
username/password on the hosted /authorize page. The previous fix keyed off
LoginForm's `done` emit, but on login the access-token flip re-renders
Authorize and unmounts LoginForm before `done` fires, so the flag that skips
the chooser was never set — the chooser stayed.

Key off the store's LOGGED_IN dispatcher event instead. It is emitted only by
an explicit login() (the form), never by a session restored from cookies
(resolve() → RESOLVED), so a lingering session still gets the chooser while a
fresh login skips it — independent of component mount/unmount timing.

Adds a component spec pinning all three cases (lingering shows, LOGGED_IN
skips, RESOLVED does not suppress).
@tada5hi

tada5hi commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants