登录到多个OpenId [英] Logging into multiple OpenIds

查看:97
本文介绍了登录到多个OpenId的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计一个允许用户向OpenId(例如Google)注册的应用程序,这将是用于登录的主要" ID.该应用程序还将允许用户链接"其他帐户(例如Facebook) )以利用其他功能.

I am designing an application that allows user to register with an OpenId (e.g. Google), which will be the "primary" id used for logging in. The application will also allow the user to "link" other accounts (e.g. Facebook) to take advantage of extra features.

虽然我在后端设计中非常清楚,该设计将存储多个帐户之间的关系(通常仅存储一个额外的userId-openId-openIdSource映射),但我想知道如何自动执行实际登录过程.我要寻找的顺序:

While I am pretty clear on the back-end design that will store the relationship between multiple accounts (usually just storing an extra userId-openId-openIdSource mapping), I am wondering how to automate the process of actual login. The sequence I am looking for:

  1. 使用主要"帐户(例如Google)登录.

  1. Login with "primary" account (e.g. Google).

自动将用户登录到其关联"帐户(例如Facebook)中< ---操作方式?

Auto-login the user into their "linked" accounts (e.g. Facebook) <--- how??

如果用户没有与第三方OpenId提供程序(例如Facebook)进行公开会话,那么我的理解是,在完成步骤1之后,她每次都必须登录到链接"帐户.自动化(没有保存他们的密码)?还是应该接受并接受步骤2的手动登录?

If the user does not have an open session with the 3rd party OpenId providers (e.g. Facebook), then my understanding is that she would have to login to the "linked" accounts every time after completing step 1. Is there a way to automate that (short of saving their password)? Or the manual login for step 2 is expected and accepted?

推荐答案

是的,用户必须手动登录所有其他链接"帐户,并且存储密码不是一个好主意,我猜没有用户愿意要么.

Yes, the user has to login to all other "linked" accounts manually and it is not a good idea to store their passwords and I guess no user would like it either.

但是OAuth可以帮您解决问题. OAuth将允许您将用户重定向到Facebook并使其登录.然后,Facebook将为您提供访问令牌,您可以使用该令牌来从Facebook检索用户信息,在其墙上张贴信息等.

But OAuth would do the trick for you. OAuth will allow you to redirect users to facebook and get them logged in. And then facebook will give you an access token which you can use to retrieve user info from facebook, post on their wall etc.

因此,请使用OpenID注册用户,然后使用OAuth登录链接"帐户.

So use OpenID to register users and then use OAuth to login into "linked" accounts.

这篇关于登录到多个OpenId的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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