Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How / where to store refresh token on Android?

I'm writing an app that uses OAuth. I know I can store the auth token using accountManager.setAuthToken, but where do I store the refresh token? I suppose I could use accountManager.setUserData or shared preferences, but they both seem hackish.

Suggestions?

like image 909
DiePartei Avatar asked Nov 23 '22 10:11

DiePartei


1 Answers

Why not change the type and set it in same Account?

accountManager.setAuthToken(account, "SECURE", secureToken);

accountManager.setAuthToken(account, "REFRESH", refreshToken);
like image 107
HOD Avatar answered Nov 25 '22 05:11

HOD