From 1431ee8ff763f27e0ba480f4b737e01920b95842 Mon Sep 17 00:00:00 2001 From: Timothy Lim Date: Sun, 2 Nov 2025 23:57:47 +0000 Subject: [PATCH 1/3] docs: Clarify email prefetch options (#40034) * docs: Clarify email prefetch options * use relative url * prettier --- .../guides/auth/auth-email-templates.mdx | 36 +++++++++++++------ 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/apps/docs/content/guides/auth/auth-email-templates.mdx b/apps/docs/content/guides/auth/auth-email-templates.mdx index 8f23b52a28414..7731d4f990a3c 100644 --- a/apps/docs/content/guides/auth/auth-email-templates.mdx +++ b/apps/docs/content/guides/auth/auth-email-templates.mdx @@ -71,20 +71,34 @@ For mobile applications, you might need to link or redirect to a specific page w 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)). In this scenario, the `{{ .ConfirmationURL }}` sent will be consumed instantly which leads to a "Token has expired or is invalid" error. -To guard against this: +To guard against this there are the options below: -- 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 click on a button to confirm the action. - For example, you can include the following in your email template: +**Option 1** - ```html - Confirm your signup - - ``` +- 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 - The user should be brought to a page on your site where they can confirm the action by clicking a button. - The button should contain the actual confirmation link which can be obtained from parsing the `confirmation_url={{ .ConfirmationURL }}` query parameter in the URL. +```html +Confirm your signup +``` + +- 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 + +```ts +const { data, error } = await supabase.auth.verifyOtp({ email, token, type: 'email' }) +``` + +**Option 2** + +- Create your own custom email link to redirect the user to a page where they can click on a button to confirm the action + +```html +Confirm your signup +``` + +- The button should contain the actual confirmation link which can be obtained from parsing the `confirmation_url={{ .ConfirmationURL }}` query parameter in the URL. ### Email tracking From bf9c99677ceff94e4854acb00bd3f0ff33fcba9e Mon Sep 17 00:00:00 2001 From: Saxon Fletcher Date: Mon, 3 Nov 2025 13:33:58 +1000 Subject: [PATCH 2/3] switch to default (#40070) --- apps/studio/components/ui/AIAssistantPanel/ModelSelector.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/studio/components/ui/AIAssistantPanel/ModelSelector.tsx b/apps/studio/components/ui/AIAssistantPanel/ModelSelector.tsx index 1a2a73a3608d5..aa050cb9c96a6 100644 --- a/apps/studio/components/ui/AIAssistantPanel/ModelSelector.tsx +++ b/apps/studio/components/ui/AIAssistantPanel/ModelSelector.tsx @@ -50,7 +50,7 @@ export const ModelSelector = ({ selectedModel, onSelectModel }: ModelSelectorPro