fix(idp): Use auth base template for IDP email verification pages#108417
Open
fix(idp): Use auth base template for IDP email verification pages#108417
Conversation
These templates were incorrectly extending the email base template since their creation in 2021. As web pages rendered in the browser, they should use the auth base template which includes proper web structure and the CSRF sync script. Without the auth base, the CSRF token sync script introduced to fix multi-tab session rotation issues was never loaded on these pages, causing CSRF failures when users submitted the "Continue" form after email verification. Co-Authored-By: Claude <noreply@anthropic.com>
The bare `btn` class renders incorrectly in the auth page context. Change to `btn btn-primary` to match the Continue button on the verified page. Co-Authored-By: Claude <noreply@anthropic.com>
ryan953
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These templates have incorrectly extended
sentry/emails/base.htmlsince their creation in 2021 (PR #29003). They are web pages rendered in the browser, not emails, so they should usesentry/bases/auth.html.The immediate motivation is CSRF failures on
/account/user-confirm/. The verified page contains a form that POSTs to/auth/login/{org}/, but because it extended the email base, the CSRF token sync script (added tobases/auth.htmlto handle multi-tab session rotation) was never loaded on this page. This meant the CSRF cookie and form token could diverge between page load and form submission.Switching to the auth base also gives these pages the correct visual treatment (standard auth page) instead of email table layout with an unsubscribe footer.
Expect these to stop after
Before:

After: