现在我有一个网络应用程序,允许用户使用用户名和密码登录/创建帐户,或通过OAuth登录/ Facebook帐户 .

现在我们正在开发用于移动应用程序的API,我需要弄清楚最佳方法是什么1)将该身份验证扩展到移动应用程序和2)确保安全地完成API请求 .

这里's a chart that sort of explains where we'重新:http://cl.ly/image/0c3m3Z1g3C27

我最初的想法是将Web API设置为OAuth提供程序以连接移动客户端,这使用户可以选择我们的3种可用身份验证方法,将它们发送到Twitter / Facebook OAuth流程,然后返回到我们的流程 . 我不确定堆叠2个OAuth流是否是一个好主意,但似乎它会起作用 .

另一个选择是使用第二个OAuth只是为了使用我们的用户名/密码登录移动应用程序,并让用户登录Facebook / Twitter直接从应用程序登录,没有中间人,可以这么说 .

Can anyone recommend a best practice for something like this based on experience? I'm sure there are similar systems out there, but I can't seem to track down any good examples.