Is it possible to access secrets in Actions outside of onExecutePostLogin function definition? Inside the function we can access a secret by calling
Currently we initialize a client inside the function but that seems to be triggered on each user login (it’s a Login flow action). I want to move the client initialization outside but it requires reading the secrets.
There are few ways you can achieve this:
- pass the secret value to the function as a parameter.
- use global variables and assign the secret value at the beginning (not recommended)
I hope it helps.
We initialize a third-party service client inside of
onExecutePostLogin and it’s being initialized on each user login which might exceed the rate limit. I guess option number 1 is only one to go with but we would need to use api.cache.
We initialize this client in multiple actions. Is there a way in Auth0 to reuse some piece of code logic across multiple actions?