Skip to content

Conversation

issuedat
Copy link
Contributor

This PR adds support for sending email notifications to a user when a factor has been enrolled/unenrolled for their account.

6 new environment variables are introduced:

  • GOTRUE_MAILER_SUBJECTS_MFA_FACTOR_{ENROLLED|UNENROLLED}_NOTIFICATION: Email subject to use for password changed notification.
  • GOTRUE_MAILER_TEMPLATES_MFA_FACTOR_{ENROLLED|UNENROLLED}_NOTIFICATION: The URL to specify a custom template.
  • GOTRUE_MAILER_NOTIFICATIONS_MFA_FACTOR_{ENROLLED|UNENROLLED}_ENABLED: whether the notification is enabled or not.

The feature is disabled by default. To enable it, the GOTRUE_MAILER_NOTIFICATIONS_MFA_FACTOR_{ENROLLED|UNENROLLED}_ENABLED environment variable must be set to true.

@issuedat issuedat requested a review from a team as a code owner September 30, 2025 11:14
@coveralls
Copy link

coveralls commented Sep 30, 2025

Pull Request Test Coverage Report for Build 18138239496

Details

  • 50 of 94 (53.19%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.07%) to 67.614%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/api/mail.go 18 30 60.0%
internal/api/mfa.go 12 28 42.86%
internal/mailer/templatemailer/templatemailer.go 0 16 0.0%
Totals Coverage Status
Change from base Build 18137474413: -0.07%
Covered Lines: 13353
Relevant Lines: 19749

💛 - Coveralls

Copy link
Contributor

@cstockton cstockton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 🚀

Base automatically changed from iat/email-changed-notification to master September 30, 2025 16:56
@issuedat issuedat force-pushed the iat/mfa-enrollment-notifications branch from 910e859 to 9c3a447 Compare September 30, 2025 17:16
Copy link

snyk-io bot commented Sep 30, 2025

🎉 Snyk checks have passed. No issues have been found so far.

code/snyk check is complete. No issues have been found. (View Details)

@issuedat issuedat force-pushed the iat/mfa-enrollment-notifications branch from 9c3a447 to 5f8d8da Compare September 30, 2025 17:26
@issuedat issuedat merged commit 53db712 into master Sep 30, 2025
5 checks passed
@issuedat issuedat deleted the iat/mfa-enrollment-notifications branch September 30, 2025 17:38
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.

4 participants