Answer the question
In order to leave comments, you need to log in
What is the principle of working with refresh/access token android?
I have an application login function in the application, that is, a person must enter his password and login to use the application's functions. These login and password are sent to the server, and if they match, the server in its response throws me two tokens, which I then use to access information. At the moment, I insert an access token everywhere, but at the same time I have to constantly log in again to get a new access token, so I actually had a question - how to update this token. If the access token is rotten, then we must send a request using the refresh token, and accordingly get a new access token for further work. I can't figure out how to send this request and get a new token, because I need to guess somehow to get to the new token. If someone dealt with such a question, then I will be very grateful if you share your experience. Thanks in advance for your valuable advice and information.
Answer the question
In order to leave comments, you need to log in
You won’t know until you make a request, you just need to process the response and see if it was successful or not, if not, update the token and make a request again
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question