Skip to content

fix(auth): set sso flags on invite accept - #123088

Merged
nora-shap merged 5 commits into
masterfrom
fix/sso-linked-on-invite-accept
Sep 1, 2026
Merged

fix(auth): set sso flags on invite accept#123088
nora-shap merged 5 commits into
masterfrom
fix/sso-linked-on-invite-accept

Conversation

@nora-shap

Copy link
Copy Markdown
Member

When a new user accepted an invite to an SSO Org, we take them through the initial login and confirmation screen where we create a new user. Instead of bringing them into the app, we brought them back to the login page where they needed to click login with SSO again because we weren't setting sso__linked = True on invite acceptance.

sentry-junior Bot and others added 2 commits August 27, 2026 23:42
Invite acceptance only attached the user and left sso:linked unset, so the
first post-login org hit failed sso_is_valid and bounced back through
needs_sso for a second IdP round-trip.

Co-Authored-By: Nora Shapiro <nora.shapiro@sentry.io>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 28, 2026
@nora-shap
nora-shap marked this pull request as ready for review August 28, 2026 23:36
@nora-shap
nora-shap requested review from a team as code owners August 28, 2026 23:36
sentry-junior Bot and others added 2 commits August 31, 2026 18:52
Lock the invite-accept path that must set sso:linked so post-login
redirect reaches the org once instead of bouncing through needs_sso.

Co-Authored-By: Nora Shapiro <nora.shapiro@sentry.io>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9fa2374. Configure here.

Comment thread tests/sentry/web/frontend/test_auth_organization_login.py Outdated
@nora-shap nora-shap closed this Sep 1, 2026
@nora-shap nora-shap reopened this Sep 1, 2026
Pre-commit injected this coverage onto the PR; the assertion is wrong for
sentry-auth-organization on a customer domain, so remove it.

Co-Authored-By: Nora Shapiro <nora.shapiro@sentry.io>
@nora-shap
nora-shap merged commit 006ebd2 into master Sep 1, 2026
66 checks passed
@nora-shap
nora-shap deleted the fix/sso-linked-on-invite-accept branch September 1, 2026 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants