diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts index f87815936c9..88106ece78f 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts @@ -745,7 +745,7 @@ export const auth: NavMenuConstant = { enabled: allAuthProvidersEnabled, }, { - name: 'Email (Magic Link or OTP)', + name: 'Email (Magic link or OTP)', url: '/guides/auth/auth-email-passwordless', enabled: allAuthProvidersEnabled, }, diff --git a/apps/docs/content/guides/auth/auth-email-templates.mdx b/apps/docs/content/guides/auth/auth-email-templates.mdx index 0aa0cb881bb..34fe78b1811 100644 --- a/apps/docs/content/guides/auth/auth-email-templates.mdx +++ b/apps/docs/content/guides/auth/auth-email-templates.mdx @@ -10,7 +10,7 @@ Authentication emails: - Confirm sign up - Invite user -- Magic link +- Magic link or OTP - Change email address - Reset password - Reauthentication @@ -20,10 +20,10 @@ Security notification emails: - Password changed - Email address changed - Phone number changed -- Identity linked -- Identity unlinked -- Multi-factor authentication (MFA) method added -- Multi-factor authentication (MFA) method removed +- Sign-in method linked +- Sign-in method removed +- Verification method added +- Verification method removed Security emails are only sent to users if the respective security notifications have been enabled at a project-level. @@ -44,8 +44,8 @@ The templating system provides the following variables for use: | `{{ .OldEmail }}` | Contains the old email address of the user. This variable is only supported in the "Email address changed notification" template. | | `{{ .Phone }}` | Contains the new phone number of the user. This variable is only supported in the "Phone number changed notification" template. | | `{{ .OldPhone }}` | Contains the old phone address of the user. This variable is only supported in the "Phone number changed notification" template. | -| `{{ .Provider }}` | Contains the provider of the newly linked/unlinked identity. This variable is only supported in the "Identity linked notification" and "Identity unlinked notification" templates. | -| `{{ .FactorType }}` | Contains the type of the newly enrolled/unenrolled MFA method. This variable is only supported in the "MFA method added notification" and "MFA method removed notification" templates. | +| `{{ .Provider }}` | Contains the provider of the linked or removed sign-in method. This variable is only supported in the "Sign-in method linked" and "Sign-in method removed" notification templates. | +| `{{ .FactorType }}` | Contains the type of verification method that was added or removed. This variable is only supported in the "Verification method added" and "Verification method removed" notification templates. | ## Editing email templates @@ -68,39 +68,39 @@ curl -X PATCH "https://api.supabase.com/v1/projects/$PROJECT_REF/config/auth" \ -H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ - "mailer_subjects_confirmation": "Confirm your signup", - "mailer_templates_confirmation_content": "

Confirm your signup

Follow this link to confirm your user:

Confirm your email

", - "mailer_subjects_magic_link": "Your Magic Link", - "mailer_templates_magic_link_content": "

Magic Link

Follow this link to login:

Log In

", - "mailer_subjects_recovery": "Rest Your Password", - "mailer_templates_recovery_content": "

Reset Password

Follow this link to reset the password for your user:

Reset Password

", - "mailer_subjects_invite": "You have been invited", - "mailer_templates_invite_content": "

You have been invited

You have been invited to create a user on {{ .SiteURL }}. Follow this link to accept the invite:

Accept the invite

", - "mailer_subjects_reauthentication": "Confirm reauthentication", - "mailer_templates_reauthentication_content": "

Confirm reauthentication

Enter the code: {{token}}

", - "mailer_subjects_email_change": "Confirm email change", - "mailer_templates_email_change_content": "

Confirm email change

Follow this link to confirm the update of your email:

Change email

", + "mailer_subjects_confirmation": "Confirm your email address", + "mailer_templates_confirmation_content": "

Confirm your email address

Follow the link below to confirm this email address and finish signing up.

Confirm email address

", + "mailer_subjects_magic_link": "Your sign-in link", + "mailer_templates_magic_link_content": "

Your sign-in link

Follow the link below to sign in. This link expires shortly and can only be used once.

Sign in

", + "mailer_subjects_recovery": "Reset your password", + "mailer_templates_recovery_content": "

Reset your password

We received a request to reset your password. Follow the link below to choose a new one.

Reset password

If you didn't request this, you can safely ignore this email.

", + "mailer_subjects_invite": "You've been invited", + "mailer_templates_invite_content": "

You've been invited

You've been invited to create an account. Follow the link below to accept.

Accept invitation

", + "mailer_subjects_reauthentication": "{{ .Token }} is your verification code", + "mailer_templates_reauthentication_content": "

Your verification code

Use the code below to verify your identity. It expires shortly.

{{ .Token }}

", + "mailer_subjects_email_change": "Confirm your new email address", + "mailer_templates_email_change_content": "

Confirm your new email address

Follow the link below to confirm {{ .NewEmail }} as your new email address.

Confirm new email address

If you didn't request this change, you can safely ignore this email.

", "mailer_notifications_password_changed_enabled": true, - "mailer_subjects_password_changed_notification": "Your password has been changed", - "mailer_templates_password_changed_notification_content": "

Your password has been changed

\n\n

This is a confirmation that the password for your account {{ .Email }} has just been changed.

\n

If you did not make this change, please contact support.

", + "mailer_subjects_password_changed_notification": "Your password was changed", + "mailer_templates_password_changed_notification_content": "

Your password was changed

\n\n

The password for your account was recently changed.

\n

If you didn't make this change, reset your password and contact support immediately.

", "mailer_notifications_email_changed_enabled": true, - "mailer_subjects_email_changed_notification": "Your email address has been changed", - "mailer_templates_email_changed_notification_content": "

Your email address has been changed

\n\n

The email address for your account has been changed from {{ .OldEmail }} to {{ .Email }}.

\n

If you did not make this change, please contact support.

", + "mailer_subjects_email_changed_notification": "Your email address was changed", + "mailer_templates_email_changed_notification_content": "

Your email address was changed

\n\n

The email address for your account was changed from {{ .OldEmail }} to {{ .Email }}.

\n

If you didn't make this change, contact support immediately.

", "mailer_notifications_phone_changed_enabled": true, - "mailer_subjects_phone_changed_notification": "Your phone number has been changed", - "mailer_templates_phone_changed_notification_content": "

Your phone number has been changed

\n\n

The phone number for your account {{ .Email }} has been changed from {{ .OldPhone }} to {{ .Phone }}.

\n

If you did not make this change, please contact support immediately.

", + "mailer_subjects_phone_changed_notification": "Your phone number was changed", + "mailer_templates_phone_changed_notification_content": "

Your phone number was changed

\n\n

The phone number for your account was changed from {{ .OldPhone }} to {{ .Phone }}.

\n

If you didn't make this change, contact support immediately.

", "mailer_notifications_mfa_factor_enrolled_enabled": true, - "mailer_subjects_mfa_factor_enrolled_notification": "A new MFA factor has been enrolled", - "mailer_templates_mfa_factor_enrolled_notification_content": "

A new MFA factor has been enrolled

\n\n

A new factor ({{ .FactorType }}) has been enrolled for your account {{ .Email }}.

\n

If you did not make this change, please contact support immediately.

", + "mailer_subjects_mfa_factor_enrolled_notification": "A new verification method was added to your account", + "mailer_templates_mfa_factor_enrolled_notification_content": "

A new verification method was added

\n\n

Sign-in verification method {{ .FactorType }} was added to your account.

\n

If you didn't make this change, contact support immediately.

", "mailer_notifications_mfa_factor_unenrolled_enabled": true, - "mailer_subjects_mfa_factor_unenrolled_notification": "An MFA factor has been unenrolled", - "mailer_templates_mfa_factor_unenrolled_notification_content": "

An MFA factor has been unenrolled

\n\n

A factor ({{ .FactorType }}) has been unenrolled for your account {{ .Email }}.

\n

If you did not make this change, please contact support immediately.

", + "mailer_subjects_mfa_factor_unenrolled_notification": "A verification method was removed from your account", + "mailer_templates_mfa_factor_unenrolled_notification_content": "

A verification method was removed

\n\n

Sign-in verification method {{ .FactorType }} was removed from your account.

\n

If you didn't make this change, contact support immediately.

", "mailer_notifications_identity_linked_enabled": true, - "mailer_subjects_identity_linked_notification": "A new identity has been linked", - "mailer_templates_identity_linked_notification_content": "

A new identity has been linked

\n\n

A new identity ({{ .Provider }}) has been linked to your account {{ .Email }}.

\n

If you did not make this change, please contact support immediately.

", + "mailer_subjects_identity_linked_notification": "A sign-in method was linked to your account", + "mailer_templates_identity_linked_notification_content": "

A sign-in method was linked

\n\n

Your {{ .Provider }} account was linked as a sign-in method for {{ .Email }}.

\n

If you didn't make this change, contact support immediately.

", "mailer_notifications_identity_unlinked_enabled": true, - "mailer_subjects_identity_unlinked_notification": "An identity has been unlinked", - "mailer_templates_identity_unlinked_notification_content": "

An identity has been unlinked

\n\n

An identity ({{ .Provider }}) has been unlinked from your account {{ .Email }}.

\n

If you did not make this change, please contact support immediately.

" + "mailer_subjects_identity_unlinked_notification": "A sign-in method was removed from your account", + "mailer_templates_identity_unlinked_notification_content": "

A sign-in method was removed

\n\n

Your {{ .Provider }} account was removed as a sign-in method for {{ .Email }}.

\n

If you didn't make this change, contact support immediately.

" }' ``` @@ -119,10 +119,10 @@ To guard against this there are the options below: **Option 1** - Use an email OTP instead by including `{{ .Token }}` in the email template -- Create your own custom email link to redirect the user to a page where they can enter with their email and token to login +- Create your own custom email link to redirect the user to a page where they can enter their email and token to sign in ```html -Confirm your signup +Confirm email address ``` - Log them in by verifying the OTP token value with their email e.g. with [`supabase.auth.verifyOtp`](/docs/reference/javascript/auth-verifyotp) show below @@ -137,7 +137,7 @@ const { data, error } = await supabase.auth.verifyOtp({ email, token, type: 'ema ```html - Confirm your signup + Confirm email address ``` diff --git a/apps/docs/content/guides/auth/auth-hooks/send-email-hook.mdx b/apps/docs/content/guides/auth/auth-hooks/send-email-hook.mdx index 3bd3c6a6fcc..070ded918cc 100644 --- a/apps/docs/content/guides/auth/auth-hooks/send-email-hook.mdx +++ b/apps/docs/content/guides/auth/auth-hooks/send-email-hook.mdx @@ -653,62 +653,62 @@ const PROJECT_REF = '' // Email Subjects const subjects = { en: { - signup: 'Confirm Your Email', - recovery: 'Reset Your Password', - invite: 'You have been invited', - magiclink: 'Your Magic Link', - email_change: 'Confirm Email Change', - email_change_new: 'Confirm New Email Address', - reauthentication: 'Confirm Reauthentication', + signup: 'Confirm your email address', + recovery: 'Reset your password', + invite: "You've been invited", + magiclink: 'Your sign-in link', + email_change: 'Confirm your new email address', + email_change_new: 'Confirm your new email address', + reauthentication: '{{token}} is your verification code', }, es: { signup: 'Confirma tu correo electrónico', recovery: 'Restablece tu contraseña', invite: 'Has sido invitado', - magiclink: 'Tu enlace mágico', - email_change: 'Confirma el cambio de correo electrónico', - email_change_new: 'Confirma la Nueva Dirección de Correo', - reauthentication: 'Confirma la reautenticación', + magiclink: 'Tu enlace de inicio de sesión', + email_change: 'Confirma tu nueva dirección de correo electrónico', + email_change_new: 'Confirma tu nueva dirección de correo electrónico', + reauthentication: '{{token}} es tu código de verificación', }, fr: { signup: 'Confirmez votre adresse e-mail', recovery: 'Réinitialisez votre mot de passe', invite: 'Vous avez été invité', - magiclink: 'Votre Lien Magique', - email_change: 'Confirmez le changement d’adresse e-mail', + magiclink: 'Votre lien de connexion', + email_change: 'Confirmez votre nouvelle adresse e-mail', email_change_new: 'Confirmez la nouvelle adresse e-mail', - reauthentication: 'Confirmez la réauthentification', + reauthentication: '{{token}} est votre code de vérification', }, } // HTML Body const templates = { en: { - signup: `

Confirm your email

Follow this link to confirm your email:

Confirm your email address

Alternatively, enter the code: {{token}}

`, - recovery: `

Reset password

Follow this link to reset the password for your user:

Reset password

Alternatively, enter the code: {{token}}

`, - invite: `

You have been invited

You have been invited to create a user on {{site_url}}. Follow this link to accept the invite:

Accept the invite

Alternatively, enter the code: {{token}}

`, - magiclink: `

Magic Link

Follow this link to login:

Log In

Alternatively, enter the code: {{token}}

`, - email_change: `

Confirm email address change

Follow this link to confirm the update of your email address from {{old_email}} to {{new_email}}:

Change email address

Alternatively, enter the codes: {{token}} and {{new_token}}

`, - email_change_new: `

Confirm New Email Address

Follow this link to confirm your new email address:

Confirm new email address

Alternatively, enter the code: {{new_token}}

`, - reauthentication: `

Confirm reauthentication

Enter the code: {{token}}

`, + signup: `

Confirm your email address

Follow the link below to confirm this email address and finish signing up.

Confirm email address

`, + recovery: `

Reset your password

We received a request to reset your password. Follow the link below to choose a new one.

Reset password

If you didn't request this, you can safely ignore this email.

`, + invite: `

You've been invited

You've been invited to create an account. Follow the link below to accept.

Accept invitation

`, + magiclink: `

Your sign-in link

Follow the link below to sign in. This link expires shortly and can only be used once.

Sign in

`, + email_change: `

Confirm your new email address

Follow the link below to confirm {{new_email}} as your new email address.

Confirm new email address

If you didn't request this change, you can safely ignore this email.

`, + email_change_new: `

Confirm your new email address

Follow the link below to confirm {{new_email}} as your new email address.

Confirm new email address

If you didn't request this change, you can safely ignore this email.

`, + reauthentication: `

Your verification code

Use the code below to verify your identity. It expires shortly.

{{token}}

`, }, es: { - signup: `

Confirma tu correo electrónico

Sigue este enlace para confirmar tu correo electrónico:

Confirma tu correo electrónico

Alternativamente, ingresa el código: {{token}}

`, - recovery: `

Restablece tu contraseña

Sigue este enlace para restablecer la contraseña de tu usuario:

Restablece tu contraseña

Alternativamente, ingresa el código: {{token}}

`, - invite: `

Has sido invitado

Has sido invitado para crear un usuario en {{site_url}}. Sigue este enlace para aceptar la invitación:

Aceptar la invitación

Alternativamente, ingresa el código: {{token}}

`, - magiclink: `

Tu enlace mágico

Sigue este enlace para iniciar sesión:

Iniciar sesión

Alternativamente, ingresa el código: {{token}}

`, - email_change: `

Confirma el cambio de correo electrónico

Sigue este enlace para confirmar la actualización de tu correo electrónico de {{old_email}} a {{new_email}}:

Cambiar correo electrónico

Alternativamente, ingresa los códigos: {{token}} y {{new_token}}

`, - email_change_new: `

Confirma la Nueva Dirección de Correo

Sigue este enlace para confirmar tu nueva dirección de correo electrónico:

Confirma la nueva dirección de correo

Alternativamente, ingresa el código: {{new_token}}

`, - reauthentication: `

Confirma la reautenticación

Ingresa el código: {{token}}

`, + signup: `

Confirma tu dirección de correo electrónico

Sigue el enlace de abajo para confirmar esta dirección de correo electrónico y terminar el registro.

Confirmar dirección de correo electrónico

`, + recovery: `

Restablece tu contraseña

Recibimos una solicitud para restablecer tu contraseña. Sigue el enlace de abajo para elegir una nueva.

Restablecer contraseña

Si no solicitaste esto, puedes ignorar este correo.

`, + invite: `

Has sido invitado

Te han invitado a crear una cuenta. Sigue el enlace de abajo para aceptar.

Aceptar invitación

`, + magiclink: `

Tu enlace de inicio de sesión

Sigue el enlace de abajo para iniciar sesión. Este enlace caduca pronto y solo se puede usar una vez.

Iniciar sesión

`, + email_change: `

Confirma tu nueva dirección de correo electrónico

Sigue el enlace de abajo para confirmar {{new_email}} como tu nueva dirección de correo electrónico.

Confirmar nueva dirección de correo electrónico

Si no solicitaste este cambio, puedes ignorar este correo.

`, + email_change_new: `

Confirma tu nueva dirección de correo electrónico

Sigue el enlace de abajo para confirmar {{new_email}} como tu nueva dirección de correo electrónico.

Confirmar nueva dirección de correo electrónico

Si no solicitaste este cambio, puedes ignorar este correo.

`, + reauthentication: `

Tu código de verificación

Usa el código de abajo para verificar tu identidad. Caduca pronto.

{{token}}

`, }, fr: { - signup: `

Confirmez votre adresse e-mail

Suivez ce lien pour confirmer votre adresse e-mail :

Confirmez votre adresse e-mail

Vous pouvez aussi saisir le code : {{token}}

`, - recovery: `

Réinitialisez votre mot de passe

Suivez ce lien pour réinitialiser votre mot de passe :

Réinitialisez votre mot de passe

Vous pouvez aussi saisir le code : {{token}}

`, - invite: `

Vous avez été invité

Vous avez été invité à créer un utilisateur sur {{site_url}}. Suivez ce lien pour accepter l'invitation :

Acceptez l'invitation

Vous pouvez aussi saisir le code : {{token}}

`, - magiclink: `

Votre Lien Magique

Suivez ce lien pour vous connecter :

Connectez-vous

Vous pouvez aussi saisir le code : {{token}}

`, - email_change: `

Confirmez le changement d’adresse e-mail

Suivez ce lien pour confirmer la mise à jour de votre adresse e-mail de {{old_email}} à {{new_email}} :

Changez d’adresse e-mail

Vous pouvez aussi saisir les codes : {{token}} et {{new_token}}

`, - email_change_new: `

Confirmez la nouvelle adresse e-mail

Suivez ce lien pour confirmer votre nouvelle adresse e-mail :

Confirmez la nouvelle adresse e-mail

Vous pouvez aussi saisir le code : {{new_token}}

`, - reauthentication: `

Confirmez la réauthentification

Saisissez le code : {{token}}

`, + signup: `

Confirmez votre adresse e-mail

Suivez le lien ci-dessous pour confirmer cette adresse e-mail et terminer votre inscription.

Confirmer l'adresse e-mail

`, + recovery: `

Réinitialisez votre mot de passe

Nous avons reçu une demande de réinitialisation de votre mot de passe. Suivez le lien ci-dessous pour en choisir un nouveau.

Réinitialiser le mot de passe

Si vous n'avez pas fait cette demande, vous pouvez ignorer cet e-mail.

`, + invite: `

Vous avez été invité

Vous avez été invité à créer un compte. Suivez le lien ci-dessous pour accepter.

Accepter l'invitation

`, + magiclink: `

Votre lien de connexion

Suivez le lien ci-dessous pour vous connecter. Ce lien expire bientôt et ne peut être utilisé qu'une seule fois.

Se connecter

`, + email_change: `

Confirmez votre nouvelle adresse e-mail

Suivez le lien ci-dessous pour confirmer {{new_email}} comme nouvelle adresse e-mail.

Confirmer la nouvelle adresse e-mail

Si vous n'avez pas demandé ce changement, vous pouvez ignorer cet e-mail.

`, + email_change_new: `

Confirmez votre nouvelle adresse e-mail

Suivez le lien ci-dessous pour confirmer {{new_email}} comme nouvelle adresse e-mail.

Confirmer la nouvelle adresse e-mail

Si vous n'avez pas demandé ce changement, vous pouvez ignorer cet e-mail.

`, + reauthentication: `

Votre code de vérification

Utilisez le code ci-dessous pour vérifier votre identité. Il expire bientôt.

{{token}}

`, }, } @@ -810,24 +810,24 @@ const FROM_EMAIL = 'myemail@gmail.com' // Email Subjects const subjects = { - signup: 'Confirm Your Email', - recovery: 'Reset Your Password', - invite: 'You have been invited', - magiclink: 'Your Magic Link', - email_change: 'Confirm Email Change', - email_change_new: 'Confirm New Email Address', - reauthentication: 'Confirm Reauthentication' + signup: 'Confirm your email address', + recovery: 'Reset your password', + invite: "You've been invited", + magiclink: 'Your sign-in link', + email_change: 'Confirm your new email address', + email_change_new: 'Confirm your new email address', + reauthentication: '{{token}} is your verification code' }; // HTML Body const templates = { - signup: `

Confirm your email

Follow this link to confirm your email:

Confirm your email address

Alternatively, enter the code: {{token}}

`, - recovery: `

Reset password

Follow this link to reset the password for your user:

Reset password

Alternatively, enter the code: {{token}}

`, - invite: `

You have been invited

You have been invited to create a user on {{site_url}}. Follow this link to accept the invite:

Accept the invite

Alternatively, enter the code: {{token}}

`, - magiclink: `

Magic Link

Follow this link to login:

Log In

Alternatively, enter the code: {{token}}

`, - email_change: `

Confirm email address change

Follow this link to confirm the update of your email address from {{old_email}} to {{new_email}}:

Change email address

Alternatively, enter the codes: {{token}} and {{new_token}}

`, - email_change_new: `

Confirm New Email Address

Follow this link to confirm your new email address:

Confirm new email address

Alternatively, enter the code: {{new_token}}

`, - reauthentication: `

Confirm reauthentication

Enter the code: {{token}}

` + signup: `

Confirm your email address

Follow the link below to confirm this email address and finish signing up.

Confirm email address

`, + recovery: `

Reset your password

We received a request to reset your password. Follow the link below to choose a new one.

Reset password

If you didn't request this, you can safely ignore this email.

`, + invite: `

You've been invited

You've been invited to create an account. Follow the link below to accept.

Accept invitation

`, + magiclink: `

Your sign-in link

Follow the link below to sign in. This link expires shortly and can only be used once.

Sign in

`, + email_change: `

Confirm your new email address

Follow the link below to confirm {{new_email}} as your new email address.

Confirm new email address

If you didn't request this change, you can safely ignore this email.

`, + email_change_new: `

Confirm your new email address

Follow the link below to confirm {{new_email}} as your new email address.

Confirm new email address

If you didn't request this change, you can safely ignore this email.

`, + reauthentication: `

Your verification code

Use the code below to verify your identity. It expires shortly.

{{token}}

` }; function generateConfirmationURL(email_data) { diff --git a/apps/docs/content/guides/auth/passwords.mdx b/apps/docs/content/guides/auth/passwords.mdx index dae2ff5cd26..4ad2eb6aafb 100644 --- a/apps/docs/content/guides/auth/passwords.mdx +++ b/apps/docs/content/guides/auth/passwords.mdx @@ -160,13 +160,13 @@ Update your signup email template to send the token hash. For detailed instructi Your signup email template should contain the following HTML: ```html -

Confirm your signup

+

Confirm your email address

-

Follow this link to confirm your user:

+

Follow the link below to confirm this email address and finish signing up.

Confirm your emailConfirm email address

``` @@ -682,13 +682,13 @@ Update your reset password email template to send the token hash. See [Email Tem Your reset password email template should contain the following HTML: ```html -

Reset Password

+

Reset your password

-

Follow this link to reset the password for your user:

+

We received a request to reset your password. Follow the link below to choose a new one.

Reset PasswordReset password

``` diff --git a/apps/docs/content/guides/auth/redirect-urls.mdx b/apps/docs/content/guides/auth/redirect-urls.mdx index 050cbe1cf5f..56f34a565f3 100644 --- a/apps/docs/content/guides/auth/redirect-urls.mdx +++ b/apps/docs/content/guides/auth/redirect-urls.mdx @@ -102,11 +102,13 @@ For example, change the following: ```html -Confirm your mail +Confirm email address Confirm your mailConfirm email address ``` diff --git a/apps/docs/content/guides/local-development/customizing-email-templates.mdx b/apps/docs/content/guides/local-development/customizing-email-templates.mdx index 8a426fa4062..99698c89298 100644 --- a/apps/docs/content/guides/local-development/customizing-email-templates.mdx +++ b/apps/docs/content/guides/local-development/customizing-email-templates.mdx @@ -29,8 +29,9 @@ content_path = "./supabase/templates/invite.html" ```html name=supabase/templates/invite.html -

Confirm your signup

-

Confirm your email

+

Confirm your email address

+

Follow the link below to confirm this email address and finish signing up.

+

Confirm email address

``` @@ -44,17 +45,15 @@ content_path = "./supabase/templates/invite.html" ```toml name=supabase/config.toml [auth.email.notification.password_changed] enabled = true -subject = "Your password has been changed" +subject = "Your password was changed" content_path = "./templates/password_changed_notification.html" ``` ```html name=templates/password_changed_notification.html -

- This is a confirmation that the password for your account {{ .Email }} has just been changed. -

-

If you did not make this change, please contact support.

+

The password for your account was recently changed.

+

If you didn't make this change, reset your password and contact support immediately.

``` @@ -67,44 +66,44 @@ There are several authentication-related email templates which can be configured ### `auth.email.template.invite` -**Default subject**: "You have been invited" +**Default subject**: "You've been invited" **When sent**: When a user is invited to join your application via email invitation -**Purpose**: Invite users who don't yet have an account to sign up +**Purpose**: Invite someone to create an account **Content**: Contains a link for the invited user to accept the invitation and create their account ### `auth.email.template.confirmation` -**Default subject**: "Confirm Your Signup" +**Default subject**: "Confirm your email address" **When sent**: When a user signs up and needs to verify their email address **Purpose**: Ask users to confirm their email address after signing up **Content**: Contains a confirmation link to verify the user's email address ### `auth.email.template.recovery` -**Default subject**: "Reset Your Password" +**Default subject**: "Reset your password" **When sent**: When a user requests a password reset -**Purpose**: Allow users to reset their password if they forget it +**Purpose**: Send a password reset link or code **Content**: Contains a link to reset the user's password ### `auth.email.template.magic_link` -**Default subject**: "Your Magic Link" -**When sent**: When a user requests a magic link for passwordless authentication -**Purpose**: Allow users to sign in via a one-time link sent to their email +**Default subject**: "Your sign-in link" +**When sent**: When a user requests a magic link or email OTP for passwordless authentication +**Purpose**: Send a one-time sign-in link or one-time password **Content**: Contains a secure link that automatically logs the user in when clicked ### `auth.email.template.email_change` -**Default subject**: "Confirm Email Change" +**Default subject**: "Confirm your new email address" **When sent**: When a user requests to change their email address **Purpose**: Ask users to verify their new email address after changing it **Content**: Contains a confirmation link to verify the new email address ### `auth.email.template.reauthentication` -**Default subject**: "Confirm Reauthentication" +**Default subject**: "{{ .Token }} is your verification code" **When sent**: When a user needs to re-authenticate for sensitive operations -**Purpose**: Ask users to re-authenticate before performing a sensitive action +**Purpose**: Ask users to verify their identity before a sensitive operation **Content**: Contains a 6-digit OTP code for verification ## Available security notification email templates @@ -113,52 +112,52 @@ There are several security notification email templates which can be configured. ### `auth.email.notification.password_changed` -**Default subject**: "Your password has been changed" +**Default subject**: "Your password was changed" **When sent**: When a user's password is changed **Purpose**: Notify users when their password has changed **Content**: Confirms that the password for the account has been changed ### `auth.email.notification.email_changed` -**Default subject**: "Your email address has been changed" +**Default subject**: "Your email address was changed" **When sent**: When a user's email address is changed **Purpose**: Notify users when their email address has changed **Content**: Confirms the change from the old email to the new email address ### `auth.email.notification.phone_changed` -**Default subject**: "Your phone number has been changed" +**Default subject**: "Your phone number was changed" **When sent**: When a user's phone number is changed **Purpose**: Notify users when their phone number has changed **Content**: Confirms the change from the old phone number to the new phone number ### `auth.email.notification.mfa_factor_enrolled` -**Default subject**: "A new MFA factor has been enrolled" -**When sent**: When a new MFA factor is added to the user's account -**Purpose**: Notify users when a new multi-factor authentication method has been added to their account -**Content**: Confirms that a new MFA factor type has been enrolled +**Default subject**: "A new verification method was added to your account" +**When sent**: When a new verification method is added to the user's account +**Purpose**: Notify users when an MFA method has been added to their account +**Content**: Confirms that a new verification method was added ### `auth.email.notification.mfa_factor_unenrolled` -**Default subject**: "An MFA factor has been unenrolled" -**When sent**: When an MFA factor is removed from the user's account -**Purpose**: Notify users when a multi-factor authentication method has been removed from their account -**Content**: Confirms that an MFA factor type has been unenrolled +**Default subject**: "A verification method was removed from your account" +**When sent**: When a verification method is removed from the user's account +**Purpose**: Notify users when an MFA method has been removed from their account +**Content**: Confirms that a verification method was removed ### `auth.email.notification.identity_linked` -**Default subject**: "A new identity has been linked" -**When sent**: When a new identity is linked to the account -**Purpose**: Notify users when a new identity has been linked to their account -**Content**: Confirms that a new identity has been linked +**Default subject**: "A sign-in method was linked to your account" +**When sent**: When a sign-in method is linked to the account +**Purpose**: Notify users when a sign-in method has been linked to their account +**Content**: Confirms that a sign-in method was linked ### `auth.email.notification.identity_unlinked` -**Default subject**: "An identity has been unlinked" -**When sent**: When an identity has been unlinked from the account -**Purpose**: Notify users when an identity has been unlinked from their account -**Content**: Confirms that an identity has been unlinked +**Default subject**: "A sign-in method was removed from your account" +**When sent**: When a sign-in method is removed from the account +**Purpose**: Notify users when a sign-in method has been removed from their account +**Content**: Confirms that a sign-in method was removed ## Template variables @@ -175,7 +174,7 @@ https://project-ref.supabase.co/auth/v1/verify?token={{ .TokenHash }}&type=email **Usage** ```html -

Click here to confirm: {{ .ConfirmationURL }}

+

Confirm email address

``` ### `Token` @@ -195,10 +194,10 @@ Contains a hashed version of the `Token`. This is useful for constructing your o **Usage** ```html -

Follow this link to confirm your user:

+

Follow the link below to confirm this email address and finish signing up.

Confirm your emailConfirm email address

``` @@ -287,22 +286,22 @@ Contains the user's old phone number. This is only available in the `phone_chang ### `Provider` -Contains the provider of the newly linked/unlinked identity. This is only available in the `identity_linked_notification` and `identity_unlinked_notification` email templates. +Contains the provider of the linked or removed sign-in method. This is only available in the `identity_linked_notification` and `identity_unlinked_notification` email templates. **Usage** ```html -

A new identity ({{ .Provider }}) has been linked to your account.

+

Your {{ .Provider }} account was linked as a sign-in method.

``` ### `FactorType` -Contains the type of the newly enrolled/unenrolled MFA factor. This is only available in the `mfa_factor_enrolled_notification` and `mfa_factor_unenrolled_notification` email templates. +Contains the type of verification method that was added or removed. This is only available in the `mfa_factor_enrolled_notification` and `mfa_factor_unenrolled_notification` email templates. **Usage** ```html -

A new factor ({{ .FactorType }}) has been enrolled for your account.

+

Sign-in verification method {{ .FactorType }} was added to your account.

``` ## Deploying email templates diff --git a/apps/studio/components/interfaces/Auth/EmailTemplates/AuthTemplatesValidation.tsx b/apps/studio/components/interfaces/Auth/EmailTemplates/AuthTemplatesValidation.tsx index 3cd04dd25e0..cccd998524b 100644 --- a/apps/studio/components/interfaces/Auth/EmailTemplates/AuthTemplatesValidation.tsx +++ b/apps/studio/components/interfaces/Auth/EmailTemplates/AuthTemplatesValidation.tsx @@ -51,12 +51,12 @@ const TemplateVariables: Record = { Provider: { name: 'Provider', value: '{{ .Provider }}', - description: 'Provider of newly linked/unlinked identity', + description: 'Provider of the sign-in method', }, FactorType: { name: 'FactorType', value: '{{ .FactorType }}', - description: 'Type of newly enrolled/unenrolled MFA factor', + description: 'Type of verification method', }, Data: { name: 'Data', @@ -110,13 +110,16 @@ const INVITE: AuthTemplate = { id: 'INVITE', type: 'object', title: 'Invite user', - purpose: "Invite users who don't yet have an account to sign up", + purpose: 'Invite someone to create an account', properties: { MAILER_SUBJECTS_INVITE: { title: 'Subject', type: 'string' }, MAILER_TEMPLATES_INVITE_CONTENT: { title: 'Body', type: 'code' }, }, variables: [ - TemplateVariables.ConfirmationURL, + { + ...TemplateVariables.ConfirmationURL, + description: 'URL to accept the invitation for creating an account', + }, TemplateVariables.Token, TemplateVariables.TokenHash, TemplateVariables.SiteURL, @@ -142,7 +145,10 @@ const MAGIC_LINK: AuthTemplate = { MAILER_TEMPLATES_MAGIC_LINK_CONTENT: { title: 'Body', type: 'code' }, }, variables: [ - TemplateVariables.ConfirmationURL, + { + ...TemplateVariables.ConfirmationURL, + description: "URL for a one-time sign-in to the user's account", + }, TemplateVariables.Token, TemplateVariables.TokenHash, TemplateVariables.SiteURL, @@ -168,7 +174,10 @@ const EMAIL_CHANGE: AuthTemplate = { MAILER_TEMPLATES_EMAIL_CHANGE_CONTENT: { title: 'Body', type: 'code' }, }, variables: [ - TemplateVariables.ConfirmationURL, + { + ...TemplateVariables.ConfirmationURL, + description: 'URL to confirm the change of email address', + }, TemplateVariables.Token, TemplateVariables.TokenHash, TemplateVariables.SiteURL, @@ -189,13 +198,16 @@ const RECOVERY: AuthTemplate = { id: 'RECOVERY', type: 'object', title: 'Reset password', - purpose: 'Allow users to reset their password if they forget it', + purpose: 'Send a password reset link or code', properties: { MAILER_SUBJECTS_RECOVERY: { title: 'Subject', type: 'string' }, MAILER_TEMPLATES_RECOVERY_CONTENT: { title: 'Body', type: 'code' }, }, variables: [ - TemplateVariables.ConfirmationURL, + { + ...TemplateVariables.ConfirmationURL, + description: 'URL for resetting the account password', + }, TemplateVariables.Token, TemplateVariables.TokenHash, TemplateVariables.SiteURL, @@ -215,7 +227,7 @@ const REAUTHENTICATION: AuthTemplate = { id: 'REAUTHENTICATION', type: 'object', title: 'Reauthentication', - purpose: 'Ask users to re-authenticate before performing a sensitive action', + purpose: 'Ask users to verify their identity before a sensitive operation', properties: { MAILER_SUBJECTS_REAUTHENTICATION: { title: 'Subject', type: 'string' }, MAILER_TEMPLATES_REAUTHENTICATION_CONTENT: { title: 'Body', type: 'code' }, @@ -297,8 +309,8 @@ const PHONE_CHANGED_NOTIFICATION: AuthTemplate = { const IDENTITY_LINKED_NOTIFICATION: AuthTemplate = { id: 'IDENTITY_LINKED_NOTIFICATION', type: 'object', - title: 'Identity linked', - purpose: 'Notify users when a new identity has been linked to their account', + title: 'Sign-in method linked', + purpose: 'Notify users when a sign-in method has been linked to their account', properties: { MAILER_SUBJECTS_IDENTITY_LINKED_NOTIFICATION: { title: 'Subject', type: 'string' }, MAILER_TEMPLATES_IDENTITY_LINKED_NOTIFICATION_CONTENT: { title: 'Body', type: 'code' }, @@ -315,8 +327,8 @@ const IDENTITY_LINKED_NOTIFICATION: AuthTemplate = { const IDENTITY_UNLINKED_NOTIFICATION: AuthTemplate = { id: 'IDENTITY_UNLINKED_NOTIFICATION', type: 'object', - title: 'Identity unlinked', - purpose: 'Notify users when an identity has been unlinked from their account', + title: 'Sign-in method removed', + purpose: 'Notify users when a sign-in method has been removed from their account', properties: { MAILER_SUBJECTS_IDENTITY_UNLINKED_NOTIFICATION: { title: 'Subject', type: 'string' }, MAILER_TEMPLATES_IDENTITY_UNLINKED_NOTIFICATION_CONTENT: { title: 'Body', type: 'code' }, diff --git a/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx b/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx index 3888dcf5e78..9b60e029926 100644 --- a/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx +++ b/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx @@ -408,7 +408,7 @@ export const RateLimits = () => { diff --git a/apps/studio/components/interfaces/Auth/Users/UserOverview.tsx b/apps/studio/components/interfaces/Auth/Users/UserOverview.tsx index 06811897b55..17f3c42aefd 100644 --- a/apps/studio/components/interfaces/Auth/Users/UserOverview.tsx +++ b/apps/studio/components/interfaces/Auth/Users/UserOverview.tsx @@ -316,10 +316,10 @@ export const UserOverview = ({ user, onDeleteSuccess }: UserOverviewProps) => { } />

Send a user a passwordless link which they can use to redeem an access_token.

diff --git a/apps/studio/components/interfaces/ProjectAPIDocs/ProjectAPIDocs.constants.ts b/apps/studio/components/interfaces/ProjectAPIDocs/ProjectAPIDocs.constants.ts index e08fce7e210..25da5fb8c0f 100644 --- a/apps/studio/components/interfaces/ProjectAPIDocs/ProjectAPIDocs.constants.ts +++ b/apps/studio/components/interfaces/ProjectAPIDocs/ProjectAPIDocs.constants.ts @@ -121,7 +121,7 @@ curl -X POST '${endpoint}/auth/v1/token?grant_type=password' \\ magicLinkLogin: { key: 'magic-link-login', category: API_DOCS_CATEGORIES.USER_MANAGEMENT, - title: `Log in with Magic Link via Email`, + title: `Sign in with magic link`, description: ` Send a user a passwordless link which they can use to redeem an access_token. diff --git a/apps/studio/data/auth/user-send-otp-mutation.ts b/apps/studio/data/auth/user-send-otp-mutation.ts index b4dd6a5f1ce..9a850460617 100644 --- a/apps/studio/data/auth/user-send-otp-mutation.ts +++ b/apps/studio/data/auth/user-send-otp-mutation.ts @@ -39,7 +39,7 @@ export const useUserSendOTPMutation = ({ }, async onError(data, variables, context) { if (onError === undefined) { - toast.error(`Failed to send magic link: ${data.message}`) + toast.error(`Failed to send OTP: ${data.message}`) } else { onError(data, variables, context) } diff --git a/apps/studio/pages/project/[ref]/observability/auth.tsx b/apps/studio/pages/project/[ref]/observability/auth.tsx index f64b5aab5ab..21122182fdb 100644 --- a/apps/studio/pages/project/[ref]/observability/auth.tsx +++ b/apps/studio/pages/project/[ref]/observability/auth.tsx @@ -112,7 +112,7 @@ const AuthUsage = () => { { label: 'SAML', value: 'saml' }, { label: 'Recovery', value: 'recovery' }, { label: 'SSO/SAML', value: 'sso/saml' }, - { label: 'Magic Link', value: 'magiclink' }, + { label: 'Magic link', value: 'magiclink' }, { label: 'Keycloak', value: 'keycloak' }, { label: 'Facebook', value: 'facebook' }, { label: 'Twitch', value: 'twitch' }, diff --git a/apps/ui-library/content/docs/nextjs/password-based-auth.mdx b/apps/ui-library/content/docs/nextjs/password-based-auth.mdx index 07b126ab2ea..1c48c7c6a50 100644 --- a/apps/ui-library/content/docs/nextjs/password-based-auth.mdx +++ b/apps/ui-library/content/docs/nextjs/password-based-auth.mdx @@ -40,13 +40,13 @@ NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY= 1. Add an [email template for sign-up](https://supabase.com/dashboard/project/_/auth/templates) to the Supabase project. Your signup email template should contain at least the following HTML: ```html -

Confirm your signup

+

Confirm your email address

-

Follow this link to confirm your user:

+

Follow the link below to confirm this email address and finish signing up.

Confirm your emailConfirm email address

``` @@ -56,13 +56,13 @@ NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY= 1. Add an [email template for reset password](https://supabase.com/dashboard/project/_/auth/templates) to the Supabase project. Your reset password email template should contain at least the following HTML: ```html -

Reset Password

+

Reset your password

-

Follow this link to reset the password for your user:

+

We received a request to reset your password. Follow the link below to choose a new one.

Reset PasswordReset password

``` @@ -76,7 +76,7 @@ NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY= -You can use this block with the Pages router by simply moving the routes from the `app` folder into the `pages` folder and renaming them. Example instead of `app/sign-up/page.tsx`, you'd create a `pages/sign-up.tsx` file. +You can use this block with the Pages router by moving the routes from the `app` folder into the `pages` folder and renaming them. Example instead of `app/sign-up/page.tsx`, you'd create a `pages/sign-up.tsx` file. diff --git a/apps/ui-library/content/docs/nuxtjs/password-based-auth.mdx b/apps/ui-library/content/docs/nuxtjs/password-based-auth.mdx index 6b606e77ca4..858a09f4cbc 100644 --- a/apps/ui-library/content/docs/nuxtjs/password-based-auth.mdx +++ b/apps/ui-library/content/docs/nuxtjs/password-based-auth.mdx @@ -40,13 +40,13 @@ NUXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY= 1. Add an [email template for sign-up](https://supabase.com/dashboard/project/_/auth/templates) to the Supabase project. Your signup email template should contain at least the following HTML: ```html -

Confirm your signup

+

Confirm your email address

-

Follow this link to confirm your user:

+

Follow the link below to confirm this email address and finish signing up.

Confirm your emailConfirm email address

``` @@ -56,13 +56,13 @@ NUXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY= 1. Add an [email template for reset password](https://supabase.com/dashboard/project/_/auth/templates) to the Supabase project. Your reset password email template should contain at least the following HTML: ```html -

Reset Password

+

Reset your password

-

Follow this link to reset the password for your user:

+

We received a request to reset your password. Follow the link below to choose a new one.

Reset PasswordReset password

``` diff --git a/apps/ui-library/content/docs/react-router/password-based-auth.mdx b/apps/ui-library/content/docs/react-router/password-based-auth.mdx index a271e69d9ba..b392ef84e08 100644 --- a/apps/ui-library/content/docs/react-router/password-based-auth.mdx +++ b/apps/ui-library/content/docs/react-router/password-based-auth.mdx @@ -40,13 +40,13 @@ VITE_SUPABASE_PUBLISHABLE_KEY= 1. Add an [email template for sign-up](https://supabase.com/dashboard/project/_/auth/templates) to the Supabase project. Your signup email template should contain at least the following HTML: ```html -

Confirm your signup

+

Confirm your email address

-

Follow this link to confirm your user:

+

Follow the link below to confirm this email address and finish signing up.

Confirm your emailConfirm email address

``` @@ -56,13 +56,13 @@ VITE_SUPABASE_PUBLISHABLE_KEY= 1. Add an [email template for reset password](https://supabase.com/dashboard/project/_/auth/templates) to the Supabase project. Your reset password email template should contain at least the following HTML: ```html -

Reset Password

+

Reset your password

-

Follow this link to reset the password for your user:

+

We received a request to reset your password. Follow the link below to choose a new one.

Reset PasswordReset password

``` diff --git a/apps/ui-library/content/docs/tanstack/password-based-auth.mdx b/apps/ui-library/content/docs/tanstack/password-based-auth.mdx index 22380eae482..143ed625567 100644 --- a/apps/ui-library/content/docs/tanstack/password-based-auth.mdx +++ b/apps/ui-library/content/docs/tanstack/password-based-auth.mdx @@ -37,13 +37,13 @@ VITE_SUPABASE_PUBLISHABLE_KEY= 1. Add an [email template for sign-up](https://supabase.com/dashboard/project/_/auth/templates) to the Supabase project. Your signup email template should contain at least the following HTML: ```html -

Confirm your signup

+

Confirm your email address

-

Follow this link to confirm your user:

+

Follow the link below to confirm this email address and finish signing up.

Confirm your emailConfirm email address

``` @@ -53,13 +53,13 @@ VITE_SUPABASE_PUBLISHABLE_KEY= 1. Add an [email template for reset password](https://supabase.com/dashboard/project/_/auth/templates) to the Supabase project. Your reset password email template should contain at least the following HTML: ```html -

Reset Password

+

Reset your password

-

Follow this link to reset the password for your user:

+

We received a request to reset your password. Follow the link below to choose a new one.

Reset PasswordReset password

```