Utilizing this API Call
Endpoint:
https://focussync.auth0.com/dbconnections/signup
Headers:
{
Content-Type: application/json
Host: focussync.auth0.com
Content-Length: 169
Expect: 100-continue
Connection: Keep-Alive
}
POST Data
{
"client_id": "our_client_id",
"email": "some_email@gmail.com",
"password": "P@ssw0rd!",
"connection": "Username-Password-Authentication",
"user_metadata": ""
}
We get this response
RESPONSE
{
"name": "InternalExtensibilityError",
"statusCode": 500,
"code": "server_error",
"message": "Internal server error",
"fromSandbox": true
}
Please let me know where i’m going wrong.
thx
Chris
More information:
Call accurately identifies a ‘duplicate user’ and a ‘weak password’. That is throw an error response, e.g.
{
"name": "BadRequestError",
"code": "user_exists",
"description": "The user already exists.",
"statusCode": 400
}
@chris.lindstrom based on your last comment the cause of the issue seemed to be that the same user already existed. Can you confirm that this was indeed the situation and you sorted the situation of if there’s more to it?
No - issue not sorted.
I was demonstrating that the call is going thru when a condition occurs that causes an error, e.g. duplicate user. When trying to create a user where no error should exist, we get the 500 error.
No - issue not sorted.
I was demonstrating that the call is going thru when a condition occurs that causes an error, e.g. duplicate user. When trying to create a user where no error should exist, we get the 500 error.
I misunderstood… can you provide more information about the connection? Is this a custom database or a regular one? Also, check that if you do have user registration hooks that they are not throwing unhandled exception as that could explain the error in the question.
Not a custom database - the default database that was setup when we started the account. I will check on the user registration hook - we have one, but thought we disabled it.
Turned off all rules and hooks - got a successful response:
{
"_id": "59c918145315152c967d2637",
"email_verified": false,
"email": "some_email2@gmail.com"
}
I’m looking on our account Dashboard, under Users and I don’t yet see the newly created users.
Does it take awhile?
Do the newly created users need to validate their email addresses before they show up on the Users list?
It appears it can take a bit (e.g. an hour) for new users to show up on the Auth0 Web Management Dashboard. The records show up immediately in the database, i.e. if you try to sign-up again, the API provides the “user already exists” error.
Looks like we found the problem - we’ll need to look harder at our hook to make sure it does a better job of handling exceptions. Thx…
Not a custom database - the default database that was setup when we started the account. I will check on the user registration hook - we have one, but thought we disabled it.
There was an incident yesterday about increased delays in user data indexing that could explain why it took an excessive amount of time for the user to show up. In a normal situation the user could take some time, in the range of seconds, to appear so that situation you experienced was likely related to the indexing delay.