Skip to content

bug(platform): a person who signs in through SSO has no Log out in the account menu #5137

Closed

Description

@yannickmonney

Summary

The pilot reports that a normal user has no sign-out button. Since #4903 (first released in v0.5.87), every session an organization's identity provider mints carries trustedOrganizationId, the field that confines the session to that organization. The app reads the same field as "an authenticating proxy owns this session" and leaves Log out out of the account menu. So everyone who signs in with Continue with SSO cannot sign out, while an owner or admin who signs in with a password can. In an SSO organization that is typically every ordinary member. The server accepts a sign-out for these sessions; only the menu hides it.

This follows from the code below. It was not reproduced against a running deployment, and the pilot's sign-in method was not captured.

The report

Abmeldebutton fehlt mit normalem User

"The sign-out button is missing for a normal user."

What the repository says (main at b2560c2d7)

  • SSO sessions are bound to their organization. createSsoUserSession writes trustedOrganizationId (the connection's organization) on every SSO session (services/platform/backend/domains/sso/service.ts:246-264). It runs at the end of every SSO sign-in, OIDC and SAML alike (:651-654). fix(platform): bind organization session authority #4903 (07419b9, 2026-10-13, "bind organization session authority") added the column to that insert; before, the row carried only activeOrganizationId.
  • The app treats that field as "proxied". services/platform/app/hooks/use-session-user.ts:18-25: "A session an authenticating proxy asserted carries the organization it was minted for; the proxy owns signing in and out for it, so the app offers no sign-out of its own." It computes proxied = typeof sessionRecord?.trustedOrganizationId === 'string'. This dates from feat(platform): own trusted-header keys per organization #3418 (3c39e4f, 2026-09-19), when only the trusted-headers door wrote the field.
  • The menu drops Log out for it (services/platform/app/components/user-button.tsx:524-535, if (!proxied)). The full-page entry failure drops its Sign in again the same way (services/platform/app/components/layout/dashboard-entry-failure.tsx:69-78).
  • The server allows the sign-out. /sign-out is one of the paths a bound session may call (services/platform/backend/auth/session-authority.ts:108-110, :218-225).
  • A stale comment. services/platform/backend/auth/auth.ts:957-961 still says "Only the trusted-headers door writes them". The session-create hook also writes the field when a passkey bound to an organization signs in (auth.ts:1006-1028, services/platform/backend/auth/passkey-authority.ts:350-377). That passkey path was not traced end to end.
  • Lifetime. An SSO session lasts 30 days unless the organization sets an idle timeout (service.ts:250-252). Without Log out, a person on a shared device cannot end it from Tale.

What the docs and tests say

  • docs/en/platform/member/preferences.md:84: "Log out in the profile menu ends the current session and returns you to sign-in. Sign out on a shared device when you finish using Tale."
  • docs/en/platform/admin/enterprise-sso.md:87 limits the missing sign-out to members who arrive through an authenticating proxy.
  • The unit test services/platform/app/components/user-button.test.tsx:402-416 sets proxied: true on a mock; no test connects an SSO session to that flag.
  • Manual boxes: AUTH-F4 (services/platform/tests/manual/suites/auth.md:70-72) logs out a password account; AUTH-F12 (:131) signs in through SSO but does not open the account menu; AUTH-F24 (:220-224) expects no Log out only for a proxied visitor.

What was not examined

  • A real SSO sign-in on a running deployment.
  • The release the pilot runs. The behaviour applies from v0.5.87.
  • Whether "normal user" means an SSO user. The role plays no part in the menu; only proxied does.

Options (no preference stated)

  1. Tell the two kinds of bound session apart: let the client know whether the trusted-headers door made the session (a separate field or a marker of the door), and hide Log out only then.
  2. Offer Log out on every session. For a proxied one, say that the proxy may sign the person in again.
  3. In addition, sign out at the identity provider (OIDC RP-initiated logout, SAML single logout), so that Continue with SSO does not silently re-enter through the provider's own session. Tale does not do this today; it can be scoped separately.

Done when (whichever option)

  • A person signed in through SSO can end their session from the account menu and lands on sign-in.
  • A session a trusted proxy asserted behaves as enterprise-sso.md:87 documents.
  • A test covers both, starting from the session row the server writes rather than a mocked flag.
  • The comment at auth.ts:957-961 and the manual boxes (AUTH-F12, or a new box) match the behaviour.

Related

#4903, #3418, #4908 (another effect of organization-bound SSO sessions), #5044 (pilot findings).

Activity

  1. yannickmonney commented on Oct 30, 2026

    @yannickmonney
    ContributorAuthor

    The reporter confirmed on 2026-10-30 that the users without Log out sign in through SSO. That matches the cause described above: every SSO session carries trustedOrganizationId (since #4903), and the account menu reads that field as a proxied session (services/platform/app/hooks/use-session-user.ts:18-25, services/platform/app/components/user-button.tsx:524-535). The behaviour itself has still not been reproduced on a running deployment.

  2. yannickmonney commented on Oct 30, 2026

    @yannickmonney
    ContributorAuthor

    Second relay of the report (2026-10-30, evening): "Sometimes there is no log out button."

    "Sometimes" fits the cause above: Log out depends on how the current session was made, not on the person or the role. The following is from the code (main at 49ce42fdd; the files are unchanged since b2560c2d7) and was not run.

    • The same member sees Log out after a password sign-in, whose session is not bound to an organization. After Continue with SSO, the session carries trustedOrganizationId (services/platform/backend/domains/sso/service.ts:246-264), and Log out is gone.
    • Until the session query answers, proxied reads false (services/platform/app/hooks/use-session-user.ts:22-25). So a person signed in through SSO can see Log out briefly before it disappears.
    • The passkey path left open above, now traced:
      • A passkey registered during an organization-bound session is bound to that organization (services/platform/backend/auth/passkey-authority.ts:325-333).
      • Every later sign-in with that passkey mints a bound session again (:357-377, written by services/platform/backend/auth/auth.ts:1018-1025), so that session has no Log out either.
      • Registering such a passkey is refused unless the operator has set TALE_ORG_SESSION_CUTOVER_AT (passkey-authority.ts:315-316), which the v0.5.88 notes say to leave empty for now. On a default deployment, this path does not occur.
  3. added
    agent-ready
    on Nov 1, 2026
  4. tale-code-bot commented on Nov 1, 2026

    @tale-code-bot
    Collaborator

    The passkey path is filed as #5259. A passkey that a person enrolls while a trusted proxy's
    session is open keeps the role the proxy asserted. Every later sign-in with that passkey writes
    the role onto the new session, so the menu hides Log out there too. It needs
    TALE_ORG_SESSION_CUTOVER_AT to be set, as traced above. This was read from the code and not
    reproduced.

    It stays out of the change for this issue (task TALE-336, branch
    test/sso-session-keeps-log-out). The behaviour this issue reports was fixed by 3c393117b
    (#4908): the app now reads a session as a proxy's only by its trustedRole, which a single
    sign-on session never carries. The branch adds tests that start from the session rows the
    server writes, the auth.ts comment and the manual box. It is still under way and has not been
    reviewed.

  5. added a commit that references this issue on Nov 1, 2026
    0793e6f
  6. added a commit that references this issue on Nov 1, 2026
    163ca69
  7. tale-code-bot commented on Nov 1, 2026

    @tale-code-bot
    Collaborator

    Reopened: GitHub closed this issue by mistake. The body of merge train pull request #5262 named it with a closing keyword where it listed commits that wait for the next train, so GitHub closed it when #5262 merged into main at 16:00 UTC. #5262 did not carry the change.

    The change that closes this issue is commit 163ca69 (test(platform): prove a single sign-on session keeps Log out, task TALE-336). It sits on the stable merge train train: it is not in main and not in v0.5.95. It reaches main with the next stable merge train, which departs at about 23:54 UTC today, and the merge of that train closes this issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybugpriority: highsecurityservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions