You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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`.
URL path to an email template to use when notifying a user that they have enrolled in a new MFA factor. (e.g. `https://www.example.com/path-to-email-template.html`)
725
+
`Email` and `FactorType` variables are available.
726
+
727
+
Default Content (if template is unavailable):
728
+
729
+
```html
730
+
<h2>MFA factor has been enrolled</h2>
731
+
732
+
<p>
733
+
A new factor ({{ .FactorType }}) has been enrolled for your account {{ .Email
734
+
}}.
735
+
</p>
736
+
<p>If you did not make this change, please contact support immediately.</p>
URL path to an email template to use when notifying a user that they have unenrolled from an MFA factor. (e.g. `https://www.example.com/path-to-email-template.html`)
746
+
`Email` and `FactorType` variables are available.
747
+
748
+
Default Content (if template is unavailable):
749
+
750
+
```html
751
+
<h2>MFA factor has been unenrolled</h2>
752
+
753
+
<p>
754
+
A factor ({{ .FactorType }}) has been unenrolled for your account {{ .Email
755
+
}}.
756
+
</p>
757
+
<p>If you did not make this change, please contact support immediately.</p>
0 commit comments