Skip to content

A re-authentication asked for at the authorize endpoint ends the sign-in cookie on a cross-site request #3203

Open

Description

@pournasserian

What happens

GET /connect/authorize with prompt=login, with max_age older than the sign-in, or after AbsoluteSessionLifetime, signs the hosted pages' cookie out and sends the user to the login page (ConnectEndpoints.cs, MemberConnect.cs). The authorize endpoint is a GET that any site can send the browser to as a top-level navigation, and the cookie is SameSite=Lax, so another site can end a user's sign-in on the hosted pages with one link, without a confirmation. The tokens of the user's tabs keep working (that is kept so by #3198), but the next silent sign-in of every tab fails.

It also means a first-party client that asks for a fresh sign-in (a step-up, a command line tool) ends the cookie that the other tabs rely on, and after #3198 the new cookie is a new server session, so the session list shows two for one browser.

Expected

A re-authentication that the request asks for keeps the cookie until the user has signed in again: send the user to the login page with the cookie left, and have the returning request require a sign-in newer than the request (auth_time). TakeOverAsync (#3198) then keeps the server session id for the same user and ends the old session only on another user's sign-in with credentials. Once the id is carried across, decide whether the authorizations of the session need anything at that moment (the review of #3199 settled that they are not revoked there).

Acceptance

From the second review of #3199.

Activity

  1. pournasserian commented on Nov 16, 2026

    @pournasserian
    MemberAuthor

    One more case for this issue's scope, from #3198 (#3199): when the authorize endpoint signs out a user whose role now requires a second factor the sign-in did not give, it ends the cookie alone, since another site can cause that request.

    The token endpoint refuses that session's refresh tokens without amr=mfa. Its access tokens, without the second factor, live until they expire, as on main.

    Carrying the session across the new sign-in, or ending it with something another site cannot cause, would close that.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions