Custom OAuth resources

Hi retool team,

Just a quick question regarding Custom OAuth workflows. I read from the documentation that the resources store variables related to the authenticating user's Retool account.

As we are building a Saas with multitenancy approach, we were wondering if it is possible to create one custom OAuth workflow, store the tokens in our database, and dinamically set them up in the resource header via the app resource query and not the resource itself. This is to avoid having to create the same resource for every user (meaning hundreds of clone resources).

However, if the resource is linked to a specific user, does that mean that it won't work if another user is trying to use it with its own token?

Thanks in advance!

Hi @MiguelOrtiz, we currently don't support that but we do have a feature request for sharing auth scheme between resources, which would prevent you from creating hundreds of them. Storing tokens in your db may not be the way because access tokens have an expiration time. If they didn't expire, the db route could work, but it would not be secure.

We added your +1 to the request and we'll keep you updated with any news from our devs.

1 Like