使用 Google 帐户作为登录名...接下来怎么办? [英] Using Google account as Login... what next?

查看:18
本文介绍了使用 Google 帐户作为登录名...接下来怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 android 开发一个应用程序,它将有一个类似 api 的服务器端.这个应用程序将有用户登录机制.我想使用 google/fb/twitter 帐户作为登录信息,因为该应用的用途非常注重社交.

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.

我已经阅读了有关使用手机中存储的 Google 帐户作为用户验证的信息 ( 如何使用 Google 帐户登录).问题是我不知道该怎么办?据我了解,客户经理最终会给我一个令牌.那我该怎么办呢?如何通知服务器端用户登录了?我如何存储这个令牌,因为我知道这个令牌在一段时间后失效时可能会改变......

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...

还有一件事.用户第一次进入G账号怎么办?我想获取他的G头像和显示名称,例如并将它们存储在服务器上,从而为用户节省一堆点击?我是通过电话以某种方式发送它们还是以某种方式从服务器获取它们?

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.

推荐答案

我认为 这个问题完全涵盖了您的问题.

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

对我来说,最好的解决方案在 this 博文.它仅适用于 Google 帐户,并假设您在 AppEngine 端使用 UserService,但我认为它运行良好.希望能帮到你.

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.

这篇关于使用 Google 帐户作为登录名...接下来怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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