Does the account link extension rule finish before executing the next rule?

My objective is to enable account linking in our application, where users are primarily passwordless authenticated. After installing the extension and modifying the custom domain I tried logging in with a Google account, but it did not work - question regarding this here.

Installing the extension adds a rule, so I opened the real-time logs to inspect the execution - and then I discovered something I did not understand. I have the account link rule placed as the first rule, and several other rules afterwards. But to my big surprise when expecting the real-time webtask logs, I get:

some output from account linking rule as expected
output from the other rules
and then: “Starting Account Link Extension - Version: 2.4.0” after the other rules ended?

So my question is - does the account link rule not await the process, or what is going on here? I would expect the account linking to be done first, and then the execution of the other rules :hushed:

Good afternoon,

Each rule is executed as a JavaScript function called in the order defined. The next rule in order won’t execute until the previous rule has completed.

Rule execution supports the asynchronous nature of JavaScript, and constructs such as Promise objects and the like can be used. Asynchronous processing effectively results in suspension of a pipeline pending completion of the asynchronous operation. An Auth0 serverless Webtask container typically has a circa 20-second execution limit, after which the container may be recycled. Recycling of a container due to this limit will prematurely terminate a pipeline—suspended or otherwise—ultimately resulting in an error in authentication being returned (as well as resulting in a potential reset of the global object).

It may depend on the rule and the code you have written.

Hi @karen1 - thanks for providing an answer. But please notice here that I’m not the author of the account linking extension, - Auth0 is.