DEV Community

Discussion on: Authenticator in Retrofit Android

Collapse
 
ashubuntu profile image
ashubuntu

if requestParams potentially consists of username and password, how do you provide that on the fly especially when the primary functionality of the app is to log the user out to the login activity when token is expired. By the way, this technique surely informs about 401 code.

Collapse
 
mohitrajput987 profile image
Mohit Rajput

Ideally we should have a refreshToken() function instead of login again.
But if you want to login again, then you can display a modal to user to enter username and password then resume this functionality as per given in blog.