-
-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add shouldCreateUser field to sign in with magiclink #199
Conversation
Decided to go with adding a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small nit regarding typedoc comment.
@@ -190,6 +190,7 @@ export default class GoTrueClient { | |||
{ email, phone, password, refreshToken, provider, oidc }: UserCredentials, | |||
options: { | |||
redirectTo?: string | |||
shouldCreateUser?: boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add this to the @param
comments above for the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, yeah i think this would also help to make it clear that the shouldCreateUser
flag can only be used for magiclinks / otp sign-ins
🎉 This PR is included in version 1.22.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This is not working, unfortunately. The user gets added when typing an email into the login form even when the flag is activated. async function signIn(email: string) {
const { error } = await supabase.auth.signIn({
email,
shouldCreateUser: false
})
return { error }
} I've tried shouldCreateUser, create_user and noSignup as the flag, since it is unclear which one it's supposed to be. But none of them work. |
What kind of change does this PR introduce?
shouldCreateUser
param for thesignIn
method