What is recommended way to check user token expiry ?
I want to check token expiry by calling server api(using retrofit) and If token expired then move to login screen from any activity or fragment.
08/24/2020, 2:21 AM
I imagine there should be an endpoint where you can check or refresh your token. You can do this step when the user starts or resume their session.
Otherwise, you can wait until a 401 or similar error happens and proceed to refresh the token and resume the original request.