Don't send notification emails when enabling trusted browser

Created on 27 February 2024, 4 months ago
Updated 28 February 2024, 4 months ago

Problem/Motivation

Currently an enabled notification email is sent when a trusted browser is added or removed. This causes a duplicate email when enabling the TFA if the user also decides to trust the current browser, as well as an email whenever manually removing a trusted browser (which seems illogical.)

Steps to reproduce

1. Enable TOTP for an user account.
2. A notification email is sent to you.
3. At the end of the process also choose to trust the current browser.
4. Another email is sent to you.
5. Remove the trusted browser from the TFA administration.
6. Yet another email is sent to you.

Proposed resolution

Don't send any notifications for the trusted browser form. The trusted browser method isn't a TFA method anyway, so it doesn't make sense to send them.

Not sure if there's a better way to do it, but I'll attach a crude patch to do it one way.

🐛 Bug report
Status

Needs work

Version

1.5

Component

Code

Created by

🇫🇮Finland ZeiP

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ZeiP
  • Status changed to Needs work 4 months ago
  • 🇺🇸United States cmlara

    Good evening,

    Does this impact 2.x as well? If so we should probably fix in that branch first.

    I do wonder if there is a way we can do this without hard-coding the plugin name, especially since it sounds like this may impact other aspects of the workflow depending upon which plugins are enabled.

    As a note the TFA project has already fully migrated to GitLab CI for testing of the D8+ releases. Due to this change all new we need contributors to utilize the MR workflow to test patches and allow merging.

    You will likely encounter this with other projects as the patch workflow will be fully disabled for all projects on July 1st https://www.drupal.org/about/core/blog/drupalci-and-all-patch-testing-wi... .

Production build 0.69.0 2024