Jiten Shah
Lurker
I need to use a REST API for accessing data. The REST API uses username and password for the initial authentication and then generates access token and refresh token which are forwarded to the Android client. Refresh token is used so that the user does not have to login everyday and it can be used to renew access token (short-lived) periodically.
My only concern is : if the phone is rooted and gets access to refresh token either from shared preferences or sql db --> the user can keep on generating the access token with help of refresh token and attack the server.
Is there a better way I can handle this situation ? I don't want user to login in every time he opens the app.
My only concern is : if the phone is rooted and gets access to refresh token either from shared preferences or sql db --> the user can keep on generating the access token with help of refresh token and attack the server.
Is there a better way I can handle this situation ? I don't want user to login in every time he opens the app.