Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Google account as Login... what next?

I'm developing an app for android, that will have an api-like server side. And this app will have users login mechanisms. I want to use a google/fb/twitter account as login information, as the purpose of the app is very socially-spoted.

I have already read about using the Google Account stored in the phone as user verification ( Howto use Google Accounts as login ). Problem is that I don't know what to do then? As I understood, the Account Manager, will finally give me a token. Then what do I do with it? How do I inform the server side that the user did login? How do I store this token, as I understood that this token might change when invalidated after some time...

And another thing. What do I do when user enters his G account for 1st time? I want to get his G avatar and display name, for example and store them on the server,thus saving the user a bunch of clicks? Do I send them somehow from the phone or I get them somehow from the server?

This same questions might arise for FB later, too.

Hope I did ask my question correctly, as this is a little more general question...

TIA.

like image 906
Djumaka Avatar asked Jul 14 '11 12:07

Djumaka


People also ask

What does signing into Google Account do?

Your account gives you access to helpful features like Autofill, personalized recommendations, and much more — any time on any device. Your Google Account helps you save time by automatically filling in passwords, addresses, and payment details using the information you've saved to your account.

Is it better to use Google login?

Using the option to sign in with Google is safe. Google's strong security and OAuth system provide better protection than current poor password practices. Users should understand the privacy concerns. Authenticators share data and account permissions to third-parties while collecting user login and traffic.

Is Google and Gmail login the same?

A Google Account gives you Google-wide access to most Google products, such as Google Ads, Gmail, and YouTube, using the same username and password.


2 Answers

I think this question covers exactly what you're asking.

For me the best solution was covered in this blog post. It will only work with Google accounts, and assumes you're using UserService on the AppEngine side, but I think it works well. I hope it helps.

like image 67
thomas88wp Avatar answered Sep 25 '22 02:09

thomas88wp


Google uses OpenId while FB has its own thing. You'll need different codepaths for those two.

http://www.sozkan.com/blog/2010/09/24/very-quick-openid-integration-tutorial/

Granted - this relies on URLs to manage the data - you'll need to wrap this in your code if you want it all to happen internally. Once you have the token you can notify your server-side code of what it is, lifespan, etc.

Info on differences: http://thenextweb.com/socialmedia/2010/11/04/facebook-connect-oauth-and-openid-the-differences-and-the-future/

like image 35
ethrbunny Avatar answered Sep 23 '22 02:09

ethrbunny