Sharing code between Auth0 Rules

We have our Auth0 rules source controlled in GIT. There are a few logging functions that we need to use among multiple different Auth0 rules. Currently they are copied and pasted into every single rule.

I tried es6 imports only to find auth0 does not support them (in fact anything outside of the main function appears to be unsupported).

Has anyone successfully shared code between Auth0 Rules? If so how?

Hey there Jack!

Personally I don’t think it’s doable but it seems like aa nice feature request. Would you mind filing it through our product feedback form? Thank you!

Hi @jack.matthews

If the rules are in the same tenant, you can use the global object:

John

2 Likes

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