Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anyway to Authenticate a user using Google Apps in an Android application?

I was wondering if anyone knows of a way I can Authenticate a Google Apps User in a Android Application?

One approach I know of is to take could take their username and password in a android view, and use the clientLogin interface (http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html).

However I was wondering if there was a different approach, maybe pushing to a browser window where it would show the google login for that domain, but I would not know how to get the details back to the application, after the authentication is done.

Any ideas on how it would be done?

like image 287
Mark Ellul Avatar asked Feb 10 '10 15:02

Mark Ellul


2 Answers

I wrote up how to get a google auth token from android (works fine in any java really) so you can call app engine hosted web services as an authenticated google user:

http://javagwt.blogspot.com/2009/12/authenticating-android-app-to-google.html

hope this helps

like image 159
ben Avatar answered Oct 13 '22 10:10

ben


You could also try using OAuth. It's supported by Google Apps, and has a Java client library.

like image 30
Erich Douglass Avatar answered Oct 13 '22 09:10

Erich Douglass