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({
|
export function MagicLinkAuthContainer({
|
||||||
inviteToken,
|
inviteToken,
|
||||||
redirectUrl,
|
redirectUrl,
|
||||||
|
shouldCreateUser,
|
||||||
}: {
|
}: {
|
||||||
inviteToken?: string;
|
inviteToken?: string;
|
||||||
redirectUrl: string;
|
redirectUrl: string;
|
||||||
|
shouldCreateUser: boolean;
|
||||||
}) {
|
}) {
|
||||||
const { captchaToken, resetCaptchaToken } = useCaptchaToken();
|
const { captchaToken, resetCaptchaToken } = useCaptchaToken();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -56,6 +58,7 @@ export function MagicLinkAuthContainer({
|
|||||||
options: {
|
options: {
|
||||||
emailRedirectTo,
|
emailRedirectTo,
|
||||||
captchaToken,
|
captchaToken,
|
||||||
|
shouldCreateUser,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ export function SignInMethodsContainer(props: {
|
|||||||
<MagicLinkAuthContainer
|
<MagicLinkAuthContainer
|
||||||
inviteToken={props.inviteToken}
|
inviteToken={props.inviteToken}
|
||||||
redirectUrl={redirectUrl}
|
redirectUrl={redirectUrl}
|
||||||
|
shouldCreateUser={false}
|
||||||
/>
|
/>
|
||||||
</If>
|
</If>
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ export function SignUpMethodsContainer(props: {
|
|||||||
<MagicLinkAuthContainer
|
<MagicLinkAuthContainer
|
||||||
inviteToken={props.inviteToken}
|
inviteToken={props.inviteToken}
|
||||||
redirectUrl={redirectUrl}
|
redirectUrl={redirectUrl}
|
||||||
|
shouldCreateUser={true}
|
||||||
/>
|
/>
|
||||||
</If>
|
</If>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user