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
Copy file name to clipboardExpand all lines: apps/docs/content/guides/auth/auth-email-templates.mdx
+25-11Lines changed: 25 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,20 +71,34 @@ For mobile applications, you might need to link or redirect to a specific page w
71
71
72
72
Certain email providers may have spam detection or other security features that prefetch URL links from incoming emails (e.g. [Safe Links in Microsoft Defender for Office 365](https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/safe-links-about?view=o365-worldwide)).
73
73
In this scenario, the `{{ .ConfirmationURL }}` sent will be consumed instantly which leads to a "Token has expired or is invalid" error.
74
-
To guard against this:
74
+
To guard against this there are the options below:
75
75
76
-
- Use an email OTP instead by including `{{ .Token }}` in the email template.
77
-
- Create your own custom email link to redirect the user to a page where they can click on a button to confirm the action.
78
-
For example, you can include the following in your email template:
- Use an email OTP instead by including `{{ .Token }}` in the email template
79
+
- Create your own custom email link to redirect the user to a page where they can enter with their email and token to login
85
80
86
-
The user should be brought to a page on your site where they can confirm the action by clicking a button.
87
-
The button should contain the actual confirmation link which can be obtained from parsing the `confirmation_url={{ .ConfirmationURL }}` query parameter in the URL.
81
+
```html
82
+
<ahref="{{ .SiteURL }}/confirm-signup">Confirm your signup</a>
83
+
```
84
+
85
+
- 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
- The button should contain the actual confirmation link which can be obtained from parsing the `confirmation_url={{ .ConfirmationURL }}` query parameter in the URL.
0 commit comments