how do you solve error 401 in your application #2389
Unanswered
dodicandra
asked this question in
Q&A
Replies: 1 comment 2 replies
-
We are currently checking the expiration of the jwt before the actual request is fired. If its about to expire, and we have a refresh token available, then we call authentication service with a refresh token then use the new access token in the original request. Being proactive there. You can also pass in a function to the retry config option, so if the request fails it will call that function to determine if it should retry. You could take the opportunity there to get a new token before attempting a retry. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm having a little trouble with this, let's say it's related to authentication, if your app doesn't have a refresh token feature, when this token expires what you want is to re-login your app, let's say we store user credentials in the app and reuse them for login. repeat. if this is successful, what is the proper way to redo the previous request where the error could be a
POST
orGET
request together with the data sent?I want to hear your opinion on cases like this
Beta Was this translation helpful? Give feedback.
All reactions