ushahidi / Ushahidi_Android

[Deprecated] Ushahidi Android app For Ushahidi V2.x.x. Working on V3.x.x at
https://github.com/ushahidi/platform-android/
GNU Lesser General Public License v3.0
202 stars 153 forks source link

Implement Account Manager #105

Open eyedol opened 11 years ago

eyedol commented 11 years ago

Use Android Account Manager to handle user authentication for the part of the API that requires users authentication

eyedol commented 11 years ago

@mrl-gt Ping. Anything I can look at? I know you were working on this sometime back

pdmholden commented 11 years ago

Is anyone working on this? If not, I'd be happy to give it a try.

eyedol commented 11 years ago

@pdmholden @mrl-gt was looking into it. We realized it was quite tricky to use the account manager to handle authentication because of the different Ushahidi deployment out there. So we decided to take a different approach and save the credentials using Preferences.

@inoran Did some preliminary work base on this approach. He used the old HTTP client we were using before. See his commit here https://github.com/inoran/Ushahidi_Android/commit/account_auth.

Perhaps you could pick up from his work?.

pdmholden commented 11 years ago

Will do.

pdmholden commented 11 years ago

Let me confirm what needs to be done:

1) Switch the current WebClient login mechanism to use the API instead. 2) Store the user's credentials on the phone. 3) The user will still use the WebClient to access the admin features of their deployment.

Have I got everything right?

eyedol commented 11 years ago

@pdmholden Correct.

Yes, they will use the WebClient to access the admin features. We can then use the stored credentials to login via the WebClient so the user shouldn't have to type their credentials to login.