Thread
#android-architecture
    amar_1995

    amar_1995

    2 years ago
    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.
    j

    John Leeroy

    2 years ago
    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.