Skip to content

Conversation

@davidB
Copy link
Contributor

@davidB davidB commented Jun 29, 2025

What kind of change does this PR introduce?

Bug fix, to not create a user when otp's options have should_create_user = Some(false)

What is the current behavior?

Calling send_email_with_otp always creates a user in the database, regardless of the should_create_user setting.

What is the new behavior?

An error is returned when should_create_user = Some(false) on a new email.

Additional context

The js/ts API doesn't match the OpenAPI on the endpoint /otp. Not just should_create_user, I guess that email_redirect_to and captcha_token are currently useless.

@Proziam
Copy link
Collaborator

Proziam commented Jun 30, 2025

Thanks David! The contribution is much appreciated. Merged.

@Proziam Proziam merged commit 3ede4b5 into supabase-community:main Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants