mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
fix: Move confirm email setting from email provider to basic auth settings (#37573)
* Move confirm email setting from email provider to basic auth settings - Remove MAILER_AUTOCONFIRM from email provider form validation - Add confirm email setting to BasicAuthSettingsForm with proper form validation - Maintain existing functionality while improving UX by grouping related settings 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Update BasicAuthSettingsForm.tsx * Fix the default value of email confirm. * Remove unnecessary comment. --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
333e11f5f0
commit
9fda63d9ba
2 files changed
+25
-6
No files matched your search
@@ -19,11 +19,6 @@ const PROVIDER_EMAIL = {
|
||||
description: 'This will enable Email based signup and login for your application',
|
||||
type: 'boolean',
|
||||
},
|
||||
MAILER_AUTOCONFIRM: {
|
||||
title: 'Confirm email',
|
||||
description: `Users will need to confirm their email address before signing in for the first time.`,
|
||||
type: 'boolean',
|
||||
},
|
||||
MAILER_SECURE_EMAIL_CHANGE_ENABLED: {
|
||||
title: 'Secure email change',
|
||||
description: `Users will be required to confirm any email change on both the old email address and new email address.
|
||||
|
||||
+25
-1
@@ -35,6 +35,7 @@ const schema = object({
|
||||
DISABLE_SIGNUP: boolean().required(),
|
||||
EXTERNAL_ANONYMOUS_USERS_ENABLED: boolean().required(),
|
||||
SECURITY_MANUAL_LINKING_ENABLED: boolean().required(),
|
||||
MAILER_AUTOCONFIRM: boolean().required(),
|
||||
SITE_URL: string().required('Must have a Site URL'),
|
||||
})
|
||||
|
||||
@@ -52,6 +53,7 @@ const BasicAuthSettingsForm = () => {
|
||||
DISABLE_SIGNUP: true,
|
||||
EXTERNAL_ANONYMOUS_USERS_ENABLED: false,
|
||||
SECURITY_MANUAL_LINKING_ENABLED: false,
|
||||
MAILER_AUTOCONFIRM: true,
|
||||
SITE_URL: '',
|
||||
},
|
||||
})
|
||||
@@ -61,7 +63,8 @@ const BasicAuthSettingsForm = () => {
|
||||
form.reset({
|
||||
DISABLE_SIGNUP: !authConfig.DISABLE_SIGNUP,
|
||||
EXTERNAL_ANONYMOUS_USERS_ENABLED: authConfig.EXTERNAL_ANONYMOUS_USERS_ENABLED,
|
||||
SECURITY_MANUAL_LINKING_ENABLED: authConfig.SECURITY_MANUAL_LINKING_ENABLED || false,
|
||||
SECURITY_MANUAL_LINKING_ENABLED: authConfig.SECURITY_MANUAL_LINKING_ENABLED,
|
||||
MAILER_AUTOCONFIRM: authConfig.MAILER_AUTOCONFIRM,
|
||||
SITE_URL: authConfig.SITE_URL,
|
||||
})
|
||||
}
|
||||
@@ -250,6 +253,27 @@ const BasicAuthSettingsForm = () => {
|
||||
</Alert_Shadcn_>
|
||||
)}
|
||||
</CardContent>
|
||||
<CardContent>
|
||||
<FormField_Shadcn_
|
||||
control={form.control}
|
||||
name="MAILER_AUTOCONFIRM"
|
||||
render={({ field }) => (
|
||||
<FormItemLayout
|
||||
layout="flex-row-reverse"
|
||||
label="Confirm email"
|
||||
description="Users will need to confirm their email address before signing in for the first time"
|
||||
>
|
||||
<FormControl_Shadcn_>
|
||||
<Switch
|
||||
checked={field.value}
|
||||
onCheckedChange={field.onChange}
|
||||
disabled={!canUpdateConfig}
|
||||
/>
|
||||
</FormControl_Shadcn_>
|
||||
</FormItemLayout>
|
||||
)}
|
||||
/>
|
||||
</CardContent>
|
||||
<CardFooter className="justify-end space-x-2">
|
||||
{form.formState.isDirty && (
|
||||
<Button type="default" onClick={() => form.reset()}>
|
||||
|
||||
Reference in new issue
Block a user