Non blocking "Rules"

Hi I am looking to integrate side effects which should not impact the outcome of the authentication.

Currently, I am using rules, but rules are executed in sequence and add to the overall latency of the authentication process.

I am wondering if there is a process to trigger something on a successful login that gets executed asynchronously seperate from the authentication flow - for example everytime a user logs in I want to update their metadata with some different information but I don’t want to make a management api call that is increasing the overall latency of the authentication flow.

Hi @Gratus-BenchSci,

Unfortunately, there’s not a way to set up non-blocking rules. The Post-User Registration hook is non-blocking, but it only runs when a user is created.

In order to avoid the API request in the rule, you can keep the information in the ID Token as a custom claim, but it won’t persist in the user’s metadata.

For more information, you can read the rules documentation:

1 Like

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