duanlan8763 2013-06-11 14:40
浏览 48
已采纳

授予我网站访问权限的最佳和最简单方法是什么(OAuth,OpenID ...)

I'd like to grant access to my site via Facebook, Twitter and so on. I will definitely need the user's email and hopefully his avatar image. I see the following algorithm:

  1. User clicking on "access via Facebook (or anything)" button
  2. Browser shows a pop-up with Facebook (or anything) login and password inputs
  3. User types in his login/password pair and clicks "Sign-In" button
  4. Something (it is not clear for me how) calls my script like mysite.com/login.php?token=token_it_self&email=john.doe@gmail.com&avatar=http://facebook.com/images/12345.jpg

Probably there are any tools to make this routine clean and easy providing most common social networks (Facebook, Twitter, LinkedIn...)? Of course free tools will be much more appreciated.

  • 写回答

1条回答 默认 最新

  • dongyun234854 2013-06-11 16:14
    关注

    I found that OpAuth [ https://github.com/opauth/opauth ] was fairly easy to implement.

    I should say though, Twitter will not expose you to the users email address which makes it almost useless when using a combination of other providers for a single sign on. You could of course have them manually verify everything in order to link other provider accounts to their twitter account, but then doesn't that defeat the purpose of single signon? Unless you, as a developer, and your users are willing to take extra steps, I would not suggest using Twitter as a sign on provider.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决