Skip to content

fix(authV2): allow account switching for signed-in org non-members - #131043

Open
akasakariko wants to merge 1 commit into
getsentry:masterfrom
akasakariko:fix/127164-org-login-account-switch
Open

akasakariko wants to merge 1 commit into
getsentry:masterfrom
akasakariko:fix/127164-org-login-account-switch

Conversation

@akasakariko

Copy link
Copy Markdown

Fixes #127164

Signed-in non-members visiting an organization login page outside single-organization mode hit a dead end when the organization does not require SSO, because email/password authentication is hidden, the SSO button is disabled when no provider is configured, and organization warnings were not rendered

Changes:

  • Render authOrganization.warnings as plain-text warning alerts ahead of loginConfig.warning and loginBannerMarkdown, deduplicating shared session-expired warnings
  • Show a Sign in with a different account button when a signed-in user is not member-authenticated on a non-demo organization without required SSO outside single-organization mode, calling logout to return to the current path and query string (or sloUrl when returned) with in-flight guarding and retryable error handling
  • Forward the next query parameter in useAuthConfig so reloading /auth/login/<org>/?next=... after sign-out preserves the destination across authentication, and update useCancelSecondFactorAuth to match /auth/config/ queries regardless of query params

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Render organization login warnings as plain-text alerts without duplicating shared session-expired warnings, forward the requested next query parameter to /auth/config/, and offer a Sign in with a different account button for signed-in non-members outside single-organization mode when SSO is not required

Fixes getsentry#127164
@akasakariko
akasakariko requested review from a team as code owners November 13, 2026 07:00
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 13, 2026

This branch has not been deployed

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

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Org login dead-ends for signed-in non-members without SSO

1 participant