improve signup container
This commit is contained in:
@@ -11,8 +11,19 @@ const DynamicAuthConfigSchema = z.object({
|
||||
oAuth: providers.array(),
|
||||
}),
|
||||
displayTermsCheckbox: z.boolean().describe('Whether to display the terms checkbox during sign-up.'),
|
||||
isMailerAutoconfirmEnabled: z.boolean().describe('Whether Supabase sends confirmation email automatically.'),
|
||||
});
|
||||
|
||||
export type DynamicAuthConfig = {
|
||||
providers: {
|
||||
password: boolean;
|
||||
magicLink: boolean;
|
||||
oAuth: Provider[];
|
||||
};
|
||||
displayTermsCheckbox: boolean | undefined;
|
||||
isMailerAutoconfirmEnabled: boolean;
|
||||
}
|
||||
|
||||
export async function getDynamicAuthConfig() {
|
||||
const authService = createAuthProvidersService();
|
||||
const dynamicProviders = await authService.getAuthConfig();
|
||||
@@ -20,6 +31,7 @@ export async function getDynamicAuthConfig() {
|
||||
const config = {
|
||||
providers: dynamicProviders.providers,
|
||||
displayTermsCheckbox: dynamicProviders.displayTermsCheckbox,
|
||||
isMailerAutoconfirmEnabled: dynamicProviders.isMailerAutoconfirmEnabled,
|
||||
};
|
||||
|
||||
return DynamicAuthConfigSchema.parse(config);
|
||||
|
||||
Reference in New Issue
Block a user