Open albertocubeddu opened 4 months ago
<MagicLink>
You're not able to provide any additional data, therefore you can't decide if you want to create users when a customer uses OTP.
Passing the proper option, you'll be able to decide if you want to have shouldCreateUser
<Auth supabaseClient={supabase} additionalData={{ shouldCreateUser: false }} view={view.id}
Furthermore, we're using the SignInWithPasswordlessCredentials and we are adding the ability to pass data too
const signInOptions: SignInWithPasswordlessCredentials = { email, options: { emailRedirectTo: redirectTo, data: restData, ...(shouldCreateUser !== undefined && { shouldCreateUser }),
I've decided to re-use the additionalData, as it's used on another component, and it seems to continue with the logic of the original author.
What kind of change does this PR introduce?
<MagicLink>
.<MagicLink>
when "additionalData" is provided (as it's optional).What is the current behavior?
You're not able to provide any additional data, therefore you can't decide if you want to create users when a customer uses OTP.
What is the new behavior?
Passing the proper option, you'll be able to decide if you want to have shouldCreateUser
Furthermore, we're using the SignInWithPasswordlessCredentials and we are adding the ability to pass data too
Additional context
I've decided to re-use the additionalData, as it's used on another component, and it seems to continue with the logic of the original author.