0

i'm developing an android oauth login system.So i had generate acess_token ,expire_in and refresh token properly.I also develop a web service to store client id and client secret.and these web app also using the keep user acess_token and other user data.So i have some few doubt in the savings acess_token in the web service.

  1. first user get the acess_token and login to the app do some work and log out,So when he re login to the app how i recognized these mobile user already have and acess_token or not having the acess_token ? (Because i store the acess_token in the web app)
  2. how can i identify android device uniquely? (i want to store acess_token with the android_id in the web app,because can i track this device user have an acess_token and direct go to the user profile )

any one can help me it's very usefully to me. Thank you

cpk
  • 17
  • 1
  • 9
  • 1: https://developer.android.com/guide/topics/data/data-storage.html check SharedPreferences 2: "Secure.getString(getContext().getContentResolver(), Secure.ANDROID_ID)" gives you an unique id (64-bit hash if I remember it correctly). – Bart Burg Apr 25 '17 at 07:27
  • thank Bart,now t get the acesstoken and using post request store the web app database..this way is good or bad? .and also this android id is unique for every android device or not. – cpk Apr 25 '17 at 07:40
  • I'm sorry I don't understand your first question. If you have an access token and it isn't session based but user based, you can save it in SharedPreferences. Read the official tutorial in the link I've send you previously. The second: read more about it in this question: http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id – Bart Burg Apr 25 '17 at 07:47
  • Btw: you should delete this question. It is not a direct question and you can easily find the answers on StackOverflow. I highly recommend you to read a lot of those articles on http://developer.android.com. It's the best resource of information on Android Development, and you really need some base knowledge if you want to create a sustainable app! – Bart Burg Apr 25 '17 at 07:53

0 Answers0