Re-usable custom auth flows

I have a custom auth flow that returns a JWT (similar to oauth, but not quite) and attaches to a custom header. In my retool instances, this custom auth flow must be used for every resource/query.

However, is there a way to save this custom auth flow so that I don't have to individually configure each resource? Ideally I could just define it once and then just pick it from the dropdown.

Hi @rogerzxu and welcome to Retool!

Yes, you would first create your resource in the Resources tab:

Then in any app you can reference this resource in your query:

Hopefully this helps.

2 Likes

Hi @rogerzxu!

If you want queries to use the same auth flow, you would configure the auth flow on the resource. As @Shawn_Optipath pointed out in his comment above!

If you want multiple resources to share the same auth flow, unfortunately this is a feature request in the works :sweat:

The work around would be to manually add in the auth flow to each resource. It is somewhat tedious but this way you can ensure that everything is tested and working correctly as expected!

1 Like