How to Refresh JWT Token with Custom Auth

Hi, I want to authenticate external api with JWT, I using custom auth to generate token and save in a variable, but how to refresh token after it is expired?

Hi Kunal! Hmm, we don’t quite support auto-refreshing tokens for custom auth just yet.
but, as long as you set a proper login test url (i.e. a URL that returns 4XX when the token is expired), your users in end-user mode should see a modal with an “Authenticate” button, that they can just click to re-auth again

This is something that is very important to add, IMHO. Users should not encounter a moment where queries fail, while they’re still using the app, only to be asked to Sign in again.

+1, if there’s no user input necessary to authenticate, we should do it silently in the background. I’ll bring this up with the team!

2 Likes

@yogi Any progress on this at all? Currently setting up some custom auth that utilizes a post request to a rest refresh token endpoint, but it needs the active token to invalidate as a header, and I don't seem to be able to pass that in dynamically.

Hey @Jake29! Would you mind sharing a screenshot of your setup so I can make sure to properly test/send the request to engineering? :slightly_smiling_face: