oAuth and refresh tokens

Our main API using Auth0 with oAuth2 for authentication. We have our resources setup successfully and they work well through Retool. Where things get a little wonky is [what I am assuming] when refresh tokens are used to get a new JWT.

When a user comes back to a Retool app which they used, say yesterday, data fetched using oAuth2 doesn't always show up. Refreshing the page once or twice then successfully retrieve the data for this app and any others being using in Retool. There was already an active oAuth session, so no they are not being asked to login again.

To help with this I built a specific app named "oAuth Check - Run first". It's basically two tables which access our main api endpoints used in Retool and load data on app load, assuming the all the auth is ready. This app is now accessed first to ensure all is connecting correctly. If no data shows, refresh the page until it does. It works, but doesn't seem right.

This app works, but doesn't seem right, so I am reaching out to see if perhaps I have something configured incorrectly, or perhaps others have seen this issue and have found a way around it.

Thank you

Hey @brettski :wave: The refresh auth workflow shouldn't need a page refresh to re-auth. Can I ask how the auth is set to trigger? Would you mind sharing screenshots of your auth setup? If you aren't comfortable sharing those screenshots publicly, please do reach out to support through chat or email so we can keep digging :slightly_smiling_face:

Thanks for the reply @lauren.gus. That's a long page, is there a specific section that would be helpful to see?

@brettski The refresh auth workflow section :+1:

This is a GraphQL endpoint and a Refresh auth workflow section does not exist in the configuration. There are General, Authentication, and GraphQL Introspection sections

@brettski Ah got it! If you use custom authentication you should see it:

@lauren.gus I think I understand the disconnect here. I don't think we are on the same page. My Resource is a GraphQL endpoint using oAuth2 authentication. The authentication section is setup like:

There are no settings for refresh tokens from what I can find with oAuth2 (nor that I have seen with other clients/consumers). I and don't see where that screen shot is that you have included.

I found the documentation you are reference here. And based on reading the documentation this doesn't appear to be an option for oAuth2 authentication. Or I should say I don't know how I would setup oAuth2 authentication under the custom authentication section.