Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 1
    thx for the reply! but how can i know if my consumer key has been compromised? lol it's will be hard to tell.. ok about storing the access token and secret, ok i save them in sharedpreferences and encrypting them but how about consumer key and secret? I can't store them in sharedpreferences (I would need to explicitly write the consumer key and secret in the code to save it in sharedpreference in the first place).. don't know if you understand what i mean. Commented Apr 15, 2012 at 16:14
  • 2
    You have to either put the in the app in a (somewhat) obfuscated way, to they are not immediately visible after decompilation, or use your own authrorization proxy webapp that has the key and secret. Putting them in the app is obviously easier, and if think the risk of someone trying to crack your app is sufficiently low, take that approach. BTW, the points above are for the user password. If you find out your consumer key/secret have been compromised, you can revoke those too (that will, of course, break your app though). Commented Apr 16, 2012 at 5:35
  • 2
    As for 2018 it is easier to keep a key using Android KeyStore Commented Mar 7, 2018 at 13:33
  • 10
    This is not the best way to store tokens anymore now-a-days! Commented Feb 1, 2019 at 11:55
  • 3
    @RahulRastogi what is the best way? Commented Nov 13, 2020 at 22:57