Share JWT token for Custom Auth between Retool apps

Hi!
I use custom JWT auth in my Retool app, and it works great.

The app grows and I want to separate it into multiple retool apps and travel between them through the navigation header.

But when I travel to another app via navigation header, it asks me for login and password, as the JWT auth token is not shared between apps.

How can I share it?

Thank you in advance!

Hey @nikkie!

Happy to help here! Are you currently generating these JWTs in the app itself or using resource auth? Would you mind sharing some screenshots of your current setup?

Hi, @Chris-Thompson!
I generate JWTs with my own backend.

Current setup looks like this:


It does not ask for auth while I'm in edit mode, and requires it in preview

Hey @nikkie!

When this app asks you to re-auth, are you currently logged in with a Retool account or is this while accessing via a public app url?

Firstly I'm logged in with my retool account

Then retool asks JWT token from my API
Every separated Retool app asks for new login into my backend (JWT token obtained on first login is not shared)

We have solved the problem by moving away from retool and implementing our own admin dashboard.

Hey @nikkie — I see, I'm sorry we were not able to get this issue resolved for you in this case. It's my understanding that auth tokens should be shared between apps provided the user is logged in. If you decide at a later date to give Retool another try I'd be happy to help dig into this deeper from our end. In the meantime, I'm glad you were able to build out a solution that works for your team!

@Chris-Thompson We have similar issue at the moment, do you think we can share token between Retool app with SSO, or can we achieve that with email/password auth as well?

@Chris-Thompson We have a similar issue were we want to share the tokens returned by our login api between apps. So the use case is as follows, we have admin dashboard with listing page and details page. At first the user login using retool and we will ask to login to the dashoard using the username and password with our login api. If the entire listing and details page is in a single app I can store the tokens returned by the our login api in temporary state. But for better performance I want to split this large app into smaller ones and now I want share the tokens between these sub apps. Is there any solution other than using local storage.

Hey @kghugo and @Tessy_Thomas! As Chris mentioned, this should be possible in Retool. Resource authentication is typically stored independent of app context. Would you mind sharing screenshots of your resource setup as well?

I'm particularly curious to see how you have your Auth trigger configured as that determines whether or not Retool will prompt the user to re-authenticate with the resource :thinking: