Skip to content

fix(idp): Use auth base template for IDP email verification pages#108417

Open
JoshFerge wants to merge 2 commits intomasterfrom
fix/idp-email-verification-csrf
Open

fix(idp): Use auth base template for IDP email verification pages#108417
JoshFerge wants to merge 2 commits intomasterfrom
fix/idp-email-verification-csrf

Conversation

@JoshFerge
Copy link
Member

@JoshFerge JoshFerge commented Feb 18, 2026

These templates have incorrectly extended sentry/emails/base.html since their creation in 2021 (PR #29003). They are web pages rendered in the browser, not emails, so they should use sentry/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 to bases/auth.html to 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:
Screenshot 2026-02-17 at 7 15 25 PM

Screenshot 2026-02-17 at 7 15 13 PM

After:

Screenshot 2026-02-17 at 7 14 48 PM Screenshot 2026-02-17 at 7 11 22 PM

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>
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 18, 2026
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>
@JoshFerge JoshFerge marked this pull request as ready for review February 18, 2026 00:16
@JoshFerge JoshFerge requested review from a team February 18, 2026 00:16
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