diff --git a/apps/supabase/config.toml b/apps/supabase/config.toml index 8e436c64a..1ae219f81 100644 --- a/apps/supabase/config.toml +++ b/apps/supabase/config.toml @@ -120,10 +120,26 @@ max_frequency = "1s" # admin_email = "admin@email.com" # sender_name = "Admin" -# Uncomment to customize email template -# [auth.email.template.invite] -# subject = "You have been invited" -# content_path = "./supabase/templates/invite.html" +# Email templates +[auth.email.template.invite] +subject = "You've been invited to join Buster" +content_path = "./supabase/templates/invite.html" + +[auth.email.template.confirmation] +subject = "Confirm your email address - Buster" +content_path = "./supabase/templates/confirmation.html" + +[auth.email.template.recovery] +subject = "Reset your password - Buster" +content_path = "./supabase/templates/recovery.html" + +[auth.email.template.magic_link] +subject = "Your magic link to sign in - Buster" +content_path = "./supabase/templates/magic_link.html" + +[auth.email.template.email_change] +subject = "Confirm your email change - Buster" +content_path = "./supabase/templates/email_change.html" [auth.sms] # Allow/disallow new user signups via SMS to your project. diff --git a/apps/supabase/templates/confirmation.html b/apps/supabase/templates/confirmation.html new file mode 100644 index 000000000..e73c63cd0 --- /dev/null +++ b/apps/supabase/templates/confirmation.html @@ -0,0 +1,149 @@ + + + + + + Confirm your email address - Buster + + + +
+
+ +

Please confirm your email address

+
+ +
+

Almost there!

+ +

+ Thanks for signing up for Buster! To complete your registration, please confirm your email address by clicking the button below. +

+ +
+ Confirm Email Address +
+ +
+ Security note: This confirmation link will expire in 24 hours. If you didn't create an account with us, you can safely ignore this email. +
+ +

+ If the button doesn't work, you can copy and paste this link into your browser:
+ {{ .RedirectTo }} +

+
+ + +
+ + diff --git a/apps/supabase/templates/email_change.html b/apps/supabase/templates/email_change.html new file mode 100644 index 000000000..e5d92c7aa --- /dev/null +++ b/apps/supabase/templates/email_change.html @@ -0,0 +1,153 @@ + + + + + + Confirm your email change - Buster + + + +
+
+ +

Confirm your email address change

+
+ +
+

Confirm email change

+ +

+ You've requested to change your email address on your Buster account. To complete this change, please confirm your new email address by clicking the button below. +

+ +
+ Confirm New Email +
+ +
+ Important: This confirmation link will expire in 24 hours. If you didn't request this email change, please contact our support team immediately. +
+ +

+ If the button doesn't work, you can copy and paste this link into your browser:
+ {{ .ConfirmationURL }} +

+ +

+ After confirming, you'll need to use your new email address to sign in to your account. +

+
+ + +
+ + diff --git a/apps/supabase/templates/invite.html b/apps/supabase/templates/invite.html new file mode 100644 index 000000000..66fd065cd --- /dev/null +++ b/apps/supabase/templates/invite.html @@ -0,0 +1,149 @@ + + + + + + You've been invited to join Buster + + + +
+
+ +

You've been invited to join our platform

+
+ +
+

Welcome!

+ +

+ You've been invited to join Buster. Click the button below to accept your invitation and set up your account. +

+ +
+ Accept Invitation +
+ +
+ Security note: This invitation link will expire in 24 hours. If you didn't expect this invitation, you can safely ignore this email. +
+ +

+ If the button doesn't work, you can copy and paste this link into your browser:
+ {{ .RedirectTo }} +

+
+ + +
+ + diff --git a/apps/supabase/templates/magic_link.html b/apps/supabase/templates/magic_link.html new file mode 100644 index 000000000..bdd669786 --- /dev/null +++ b/apps/supabase/templates/magic_link.html @@ -0,0 +1,153 @@ + + + + + + Your magic link to sign in - Buster + + + +
+
+ +

Your magic link to sign in

+
+ +
+

Sign in to Buster

+ +

+ Click the button below to securely sign in to your Buster account. No password required! +

+ +
+ Sign In with Magic Link +
+ +
+ Security note: This magic link will expire in 5 minutes for your security. If you didn't request this sign-in link, you can safely ignore this email. +
+ +

+ If the button doesn't work, you can copy and paste this link into your browser:
+ {{ .ConfirmationURL }} +

+ +

+ For security reasons, this link can only be used once and will expire automatically. +

+
+ + +
+ + diff --git a/apps/supabase/templates/recovery.html b/apps/supabase/templates/recovery.html new file mode 100644 index 000000000..fd0b0911b --- /dev/null +++ b/apps/supabase/templates/recovery.html @@ -0,0 +1,153 @@ + + + + + + Reset your password - Buster + + + +
+
+ +

Password reset request

+
+ +
+

Reset your password

+ +

+ We received a request to reset the password for your Buster account. If you made this request, click the button below to create a new password. +

+ +
+ Reset Password +
+ +
+ Important: This password reset link will expire in 1 hour for security reasons. If you didn't request a password reset, please ignore this email and your password will remain unchanged. +
+ +

+ If the button doesn't work, you can copy and paste this link into your browser:
+ {{ .RedirectTo }} +

+ +

+ If you continue to have problems, please contact our support team. +

+
+ + +
+ + diff --git a/apps/web/src/components/features/auth/ResetPasswordForm.tsx b/apps/web/src/components/features/auth/ResetPasswordForm.tsx index 461205c27..05904aca4 100644 --- a/apps/web/src/components/features/auth/ResetPasswordForm.tsx +++ b/apps/web/src/components/features/auth/ResetPasswordForm.tsx @@ -1,4 +1,3 @@ -import type { UserResponse } from '@buster/server-shared/user'; import type { User } from '@supabase/supabase-js'; import { useRouter } from '@tanstack/react-router'; import type React from 'react';