Add shouldCreateUser property to MagicLinkAuthContainer
The update integrates a new property, shouldCreateUser, in MagicLinkAuthContainer component. This property defines the behavior for both the sign-in and sign-up methods. It is assigned false for sign-in and true for sign-up methods.
This commit is contained in:
@@ -27,9 +27,11 @@ import { useCaptchaToken } from '../captcha/client';
|
||||
export function MagicLinkAuthContainer({
|
||||
inviteToken,
|
||||
redirectUrl,
|
||||
shouldCreateUser,
|
||||
}: {
|
||||
inviteToken?: string;
|
||||
redirectUrl: string;
|
||||
shouldCreateUser: boolean;
|
||||
}) {
|
||||
const { captchaToken, resetCaptchaToken } = useCaptchaToken();
|
||||
const { t } = useTranslation();
|
||||
@@ -56,6 +58,7 @@ export function MagicLinkAuthContainer({
|
||||
options: {
|
||||
emailRedirectTo,
|
||||
captchaToken,
|
||||
shouldCreateUser,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ export function SignInMethodsContainer(props: {
|
||||
<MagicLinkAuthContainer
|
||||
inviteToken={props.inviteToken}
|
||||
redirectUrl={redirectUrl}
|
||||
shouldCreateUser={false}
|
||||
/>
|
||||
</If>
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ export function SignUpMethodsContainer(props: {
|
||||
<MagicLinkAuthContainer
|
||||
inviteToken={props.inviteToken}
|
||||
redirectUrl={redirectUrl}
|
||||
shouldCreateUser={true}
|
||||
/>
|
||||
</If>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user