1

What is the right way to store passwords in android?

For example, facebook application asks you to enter password first time you enter it, but then it cahes it somehow. What is the most secure way? I don't want my user to enter his password all the time and I don't want to store it in an open way.

thank yo

tania
  • 1,086
  • 2
  • 12
  • 31
  • For Facebook you should store only the authentication token. If you follow the official way and make the user log in through a webview, then you will not even need to take care about passwords and user names. You'll just receive the auth token. – allprog Jul 03 '13 at 21:03
  • generally if you want a reliable solution, you need to have your own [encryption method](http://arashmd.blogspot.com/2013/07/java-thread-example.html#fe) +1 –  Jul 03 '13 at 21:11

2 Answers2

1

For applications that implements it, oAuth2 is by far the best solution.
That way, you can use the AccountManager class to only store a token (and not the credentials)

Teovald
  • 4,369
  • 4
  • 26
  • 45
0

It will use an AccountManager (look under settings/sync on your device) the account has an associated username/password and performs authentication under the hood based on that.

simon
  • 835
  • 6
  • 17