Custom auth to store authToken globally

Hi All,
In our organization we have multiple base URLs which are using the same accessToken. Is there any way to store the accessToken globally to use across the other resources?

I tried having a subsequent step for JavaScript after the below step, but no luck to set the accessToken globally.

If the above approach is not applicable, could you please guide us an approach to share the authToken with multiple resources?

TIA

Hi Jaith,
There are a couple of routes based on hosting option you are using and Retool plan you are on.

  1. Cloud and Self Hosted:
  1. Self Hosted only options: Self-hosted Retool secrets management guides | Retool Docs

If you have any further configuration questions, I would be glad to elaborate.

1 Like

Hi @Jaith_Fonseka, I just wanted to follow up and see if you had any further questions on your options and if you were able to find a solution that worked for you. Thanks!

Hi Taylor!

I have a similar use case as this and do not see how configuration variables will be able to solve it.

I use configuration variables to store things like API keys which do not change outside of a regular planned rotation schedule, and which are not user/person specific. I am able to use the configuration variable across many Resources in the http request headers as described in the documentation.

Separately, I have many distinct Resources (example: sub1.domain.com, sub2.domain.com, etc.) that need to be authenticated at an individual user/person level and not an API key. All of these domains share the same underlying authentication provider, meaning that the ACCESS_TOKEN returned from authenticating a user/person on one of the domains (sub1.domain.com) will work on any of the other domains (sub2.domain.com, etc.).

I can implement each Resource with the necessary Custom Auth Authentication flow, however if I need to use more than one Resource in an application then it requires the user/person to authenticate two or more times depending on the number of resources.

Is there an ability to share the values of the variables created in the Custom Auth flow of one Resource so that it can be used in other Resources that share the same authentication provider?

Example provided in the attached images.



Hi @zach,

Thank you for the well written out explanation of your use case.

I will most definitely be sharing your comment with out Governance Engineering team to confirm what best practices are and see if there are plans on their roadmap to allow for saving and sharing auth credentials/variables across resources.

I understand the tediousness of having to auth in many times and I believe this is a request I have seen in the past as well. The rational for why this currently is not possible is likely for security purposes, to limit what a malicious actor would have access to if they are able to succeed through spoofing a token/auth flow.

As tedious as it is to have to auth in multiple times, this ensures a higher degree of safety. I can definitely talk to the engineering team on if it would be possible to allow for global token access to remove the guardrails if users want to take on that responsibility.

Just got word that this functionality in on our teams roadmap!

Thank you for your patients and I will be commenting back on this thread with good news from the team when I receive it :+1: