Skip to content

fix(email): Add login links to deactivation and org deletion emails#117053

Merged
souredoutlook merged 6 commits into
masterfrom
fix/deactivation-email-login-links
Jun 8, 2026
Merged

fix(email): Add login links to deactivation and org deletion emails#117053
souredoutlook merged 6 commits into
masterfrom
fix/deactivation-email-login-links

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Changes

Two email templates updated to surface the login step explicitly, making it clickable rather than implied.

user-deactivated (html + txt)

  • please log in in "To reactivate your account, please log in before the scheduled deletion date" is now a link to https://sentry.io/auth/login/

org_delete_confirm (html + txt)

  • Adds a line below the Restore Organization button: "If you accidentally deleted this org as part of closing your account, please log in to reactivate your account before attempting to restore this organization" — with please log in linked to https://sentry.io/auth/login/

Why

Users who close their account (deactivating it) and then try to restore an org via the link in the deletion email hit an infinite redirect loop — the restore page requires an active account, bounces them to login, which forwards them back to restore, repeat. The fix for the loop is in #117052. These email changes surface the required order of operations (reactivate account first, then restore org) before users even click the restore link.

Refs #117050 #117052

Action taken on behalf of Rahul Chhabria.


View Session in Sentry

In both the 'account deactivated' and 'org queued for deletion' emails,
users who hit the org restore page while their account is inactive run
into an infinite redirect loop. Making the login step explicit and
clickable reduces friction and surfaces the required action clearly.

- user-deactivated: 'please log in' is now a link to sentry.io/auth/login/
- org_delete_confirm: adds a note below the Restore button explaining
  that account-close-triggered deletions require logging in and
  reactivating before the org can be restored; 'please log in' is linked

Refs #117050 #117052

Co-authored-by: Nick Meisenheimer <nicholas.meisenheimer@sentry.io>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 6, 2026
@souredoutlook souredoutlook marked this pull request as ready for review June 6, 2026 16:33
@souredoutlook souredoutlook requested a review from a team as a code owner June 6, 2026 16:33

@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.

Reviewed by Cursor Bugbot for commit 586a3b3. Configure here.

Comment thread src/sentry/templates/sentry/emails/org_delete_confirm.html Outdated
@souredoutlook souredoutlook added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Jun 6, 2026
Comment thread src/sentry/templates/sentry/emails/org_delete_confirm.html Outdated
Replace hardcoded sentry.io login URLs with {% absolute_uri '/auth/login/' %}
so the links resolve correctly on self-hosted and custom-domain installs.
Also removes the word 'accidentally' from the org deletion email copy.

Addresses Bugbot review comment on #117053.

Co-authored-by: Nick Meisenheimer <nicholas.meisenheimer@sentry.io>
@github-actions github-actions Bot removed the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Jun 6, 2026
Comment thread src/sentry/templates/sentry/emails/org_delete_confirm.html Outdated
Comment thread src/sentry/templates/sentry/emails/org_delete_confirm.txt Outdated
@souredoutlook souredoutlook added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Jun 8, 2026
@souredoutlook souredoutlook merged commit 3f648a9 into master Jun 8, 2026
70 of 76 checks passed
@souredoutlook souredoutlook deleted the fix/deactivation-email-login-links branch June 8, 2026 18:11
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 Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants