Rules for Signup is not invoked when I use REST API(endpoint for signup)

Hi Auth0,

We are using Lock widget on our site and it works well.

So, when user signup on the site using Lock, all rules which I registered on the Auth0 dashboard are called.

However, we need to add another way to signup for the customer and are trying to use signup endpoint.
When we try to signup rest api, it works well, after signup we can see user data on auth0 dashboard, but Rules for signup like calling our rest api to make profile on our database or sending slack message is not called.

Furthermore, we have checked that the signed up user try to login ( first time/first login ), the rules are called at the moment.

I attached the logs :

11:20:26 AM:Connected
<= sign up here and success , but nothings

11:21:10 AM: new webtask request 1549412470658.242911 <= first login success then this job is called.

11:21:10 AM: send noti to slack

11:21:10 AM: New user data insert!!

11:21:12 AM:Success : New user data insert!!

11:21:12 AM: finished webtask request 1549412470658.242911 with HTTP 200 in 1494ms

11:40:27 AM: Connected

Hey @Jihoon!

Let me investigate it further internally and get back to you with any updates Once I have something to share!


Hey there @Jihoon!

I sent you a DM to investigate it further and tell you what next steps should be.

Hi I am having an identical issue with our system.
Our custom rule is called when we sign up using the normal signup form in a browser.
But when we use the /dbconnections/signup API outside a browser, signup is successful but the rule is not triggered.

What was the resolution to this problem? Is there something we can try? @konrad.sopala @Jihoon

I noticed that the signup web form finishes with an Authorization Code for Access Token Log. However when you call the signup API, it doesn’t immediately call the /token endpoint for an Auth Code grant type (We only use the Password grant type).

Is this related? Perhaps the rules only trigger upon the first successful Auth Code redemption?

Hey @Jihoon!

Are you able to share some insights from your discussion and co-operation with someone from our developer support crew to see if @jesse2 does indeed have a similar situation?

Thanks a lot!

I found another thread with a similar issue (thread is closed)

@jmangelo Are Pre-User-Registration hooks the only way to run something after both a Signup from the Custom Signup API, and signup through the Universal Login Lock web form?

We are only using password type token retrieval, not Auth Code type, like the Universal Login form uses.

Yes, if you need custom code to execute immediately after the user completes the signup in a database connection then you’ll have to rely on the hooks.

The rules functionality is only applicable for authentication events which depending on how you perform the signup may or may not occur immediately. When using universal login the client application initiated a login transaction and as such if the end-user decides to signup this will be immediately followed by a login (which is what trigger the rules).

If in your flow you’re calling signup endpoint and then using the resource owner password credentials (ROPC) grant for authentication then rules will only be executed when ROPC grant is initiated which depends on your application and as such may not be occurring immediately after the signup.