Skip to content

LG-13739: Avoid sending new device email after account creation#10877

Merged
aduth merged 1 commit intomainfrom
aduth-lg-13739-new-device-account-created
Jun 27, 2024
Merged

LG-13739: Avoid sending new device email after account creation#10877
aduth merged 1 commit intomainfrom
aduth-lg-13739-new-device-account-created

Conversation

@aduth
Copy link
Copy Markdown
Contributor

@aduth aduth commented Jun 27, 2024

🎫 Ticket

LG-13739

🛠 Summary of changes

Updates logic of User#authenticated_device? to consider the device authenticated if it was the one that had created the account. This fixes an issue where the new-device email would be unexpectedly sent the first time the user signs in after creating an account, even if that was the device they'd used to create the account.

The issue stems from the fact that we previously relied on :sign_in_after_2fa event existing for the device, but this event is only created if a user authenticates with 2FA, which doesn't happen during the account creation process.

📜 Testing Plan

  1. In a private browsing window, go to http://localhost:3000
  2. Create an account
  3. Once you reach the account dashboard, sign out
  4. Sign in to that new account

Before: You'd receive a new device sign-in email
After: You don't receive a new device sign-in email

changelog: Upcoming Features, Aggregated Sign-In Email, Avoid sending new device email after account creation
@aduth aduth requested review from a team and mitchellhenke June 27, 2024 12:53
@aduth aduth merged commit 4259cf5 into main Jun 27, 2024
@aduth aduth deleted the aduth-lg-13739-new-device-account-created branch June 27, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants