使用谷歌帐户登录......何去何从? [英] Using Google account as Login... what next?

查看:231
本文介绍了使用谷歌帐户登录......何去何从?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为Android开发的应用程序,这将有一个API般的服务器端。而这个程序将让用户登录机制。我想使用谷歌/ FB / Twitter帐号作为登录信息,因为该应用程序的目的是非常有社会-spoted。

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.

我已经阅读有关使用存储在手机中的用户验证的谷歌帐户( HOWTO使用谷歌账户如登录)。问题是,我不知道该怎么办呢?我的理解,对客户经理,将最终给我一个令牌。然后,我用它做什么?我怎么通知服务器端,用户没有登录?我如何保存这个道理,因为我明白,当一段时间后失效此令牌可能会改变......

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?

这同样的问题可能出现的FB以后了。

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。

推荐答案

我觉得<一个href="http://stackoverflow.com/questions/3352592/webservice-credentials-openid-android-accountmanager/13938157#13938157">this问题包括你问什么。

对我来说,最好的解决办法浑身的这个的博客文章。它只会与谷歌帐户的工作,并且假设你使用UserService的在AppEngine上的一面,但我觉得它工作得很好。我希望它能帮助。

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.

这篇关于使用谷歌帐户登录......何去何从?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆