question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document *all* variables available in rules.

See original GitHub issue

Is there any complete documentation about the variables available within rules? I can find no reference in documentation to the auth0 object, but yet it’s used here

https://github.com/auth0/rules/blob/2392ea11601ec0b220e4b3c3a2408cd3a1f50233/redirect-rules/simple/rule.js

as auth0.baseUrl. (this is very helpful for instance, if i need to do a client-credentials grant against the current auth0 account without hardcoding)

As a user - having undocumented variables in examples is incredibly confusing. i’d love to see the documentation updated to include all the variables that are available within a rule (including global).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
villeodellcommented, Sep 6, 2018

Was this misunderstood when closed? It was not about available modules that can be required but rather a desire to have documentation regarding all objects/variables that are available to rules by default, e.g. auth0, user, context, others(?).

_Basically, to have this for all objects/variables available within rules --> https://auth0.com/docs/rules/current/context_

Information about the user object is spread out in multiple places…

There is some documentation of the auth0 object here: https://auth0.com/docs/rules/current/management-api

In case anyone is arriving here looking for that (as I did) sticking this code in a rule to inspect the objects you are interested in may be a help:

const objects = [auth0, user, context]; objects.forEach((obj) => console.dir(obj, { depth: 4 }));

1reaction
shawnmcleancommented, Jun 8, 2018

This section of the docs contains references to the available modules and what you may be able to require: https://auth0.com/docs/rules/current#available-modules

Read more comments on GitHub >

github_iconTop Results From Across the Web

firebase - What variables are available for use as "wildcards ...
My question is "what variables are available for use as wildcards?". According to the Google document referenced above "A wildcard variable is ...
Read more >
Storing the information you need — Variables - MDN Web Docs
Generally, you should stick to just using Latin characters (0-9, a-z, A-Z) and the underscore character.
Read more >
Managing the Variables in a Rule Set - SAS Help Center
When a rule set is deployed in a production system, all input variables must be mapped to table columns in input data. When...
Read more >
Solved: Global objects and variables - ServiceNow Community
Use the following predefined global variables to reference the system in a business rule script. 1. current :The current state of the record ......
Read more >
GNU make
GNU make. This file documents the GNU make utility, which determines automatically which pieces of a large program need to be recompiled, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found