I have multiple auth0 actions running in my tenant. In one action , there are many lines of code being executing to update a variable. Need to use that variable value in another action. How can i achieve this ? I tried using api.cache but since caching is not transaction specific, it is a risk to use in case of simultaneous logins. Is it possible to set claim in token in one action then log the api.idToken to see the value in it but doesnt work
Welcome back to the Auth0 Community!
Thank you for posting your question. Unfortunately, actions currently do not support global objects, so caching is the only way to store and retrieve data that persists in executions.
Thanks
Dawid
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
Hi everyone! 
Actions Transaction Metadata is now in EA. It lets you pass small key–value data between multiple post-login Actions during a single authentication transaction.
How it works: set with api.transaction.setMetadata([
key], [
value])
, then read via event.transaction.metadata.key
later in the same login flow.
- You can read more about that feature from our docs → Docs: auth0.com/docs/customize/actions/transaction-metadata
NOTE: Transaction metadata is only available during the current authentication transaction and is not persisted beyond the completion of the authentication flow. This feature is only currently available on post-login
Actions.
Thanks!
Dawid