Persistency of the global object across rules

I’m trying to persist an access token inside the global object but so far I haven’t been able to do it. Only the first time I run the rule it works then if try for a second time it doesn’t work (I’m not able to fetch it), so it means that for some reason the global object is being restored.

I really want to do this as this token is coming from the client credentials flow from auth0 and there is a limit in the number of tokens we can generate.

Could this issue be related to that I’m using a free tenant? and a new container is being assigned on every request?

2 Likes

Hi @alejandro.garcia Welcome to Auth0 community.

No there is no special configuration for free vs paid tenants around globalConfig object. I can’t put my finger on what might be wrong here. Could you show us how you are storing the access token on the globalConfig object?

1 Like

Hey there!

As this topic is related to Rules - Hooks - Actions and Rules & Hooks are being deprecated soon I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!

Learn more here!