getUser is called before create

getUser(byEmail) is called before the create script for custom databases.

It was already reported here: try-create script not working - #3 by anthony.r.dipasquale, but it looks like it’s still missing from the documentation.

I advise to add a small sentence after the “This script will be executed when the user signs up.” description.

What’s the expected return of getUser when no user matches? I now return null instead of an error (I tried both string and Object errors, they all block the call to create).

I just want to make sure that we following the Auth0’s best practices.

For the expected response it is indeed expected to return null in that scenario so your current implementation is correct; the expectations of each script in terms of responses can be found in the comments available above the placeholder implementation when you create the script.

In relation to the docs issue there is a note at (Custom Database Connections) that mentions this situation about the get user script being called before the create for signups.

Thank you very much!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.