Skip to content

Conversation

dangquangdon
Copy link

At the moment, when we enable createCustomerOnSignUp , it could happen that when an user signs up with an email that duplicates with an existing customer in Polar, Polar will throw an error in the sign up screen, however, user is still created in the database.

This PR add an option to tell better-auth to skip creating new user record when that happens.

Add a before user database hook that check if the new user would have a
conflict customer ExternalID. When that's case, throw a conflict error
to stop the user creation too.
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.

1 participant