【问题标题】:AngularJS and Web Api Social authenticationAngularJS 和 Web Api 社交认证
【发布时间】:2014-10-21 01:33:03
【问题描述】:

我需要一些帮助来使用外部社交登录(twitter、facebook、google 等)验证我的 angularJS 应用和我的 rest api(WEB API)。

我正在使用 Web-api 和 angularJS 应用程序(不是 Visual Studio 的 spa 项目,它是独立的)。

如果我想通过我的后端通过 oauth 进行身份验证,但要在前端确认权限访问,我应该怎么做?

类似的东西,但在我的后端使用身份验证https://dev.twitter.com/docs/browser-sign-flow

【问题讨论】:

  • 你看过one这样的文章吗?
  • 我完全按照这篇文章进行操作,它对我来说效果很好。这很长,但请耐心等待并逐步完成!

标签: c# angularjs oauth-2.0 twitter-oauth asp.net-web-api


【解决方案1】:

您可以使用 JWT 在前端设置身份验证状态,并使用它来验证您对后端的调用

http://www.intridea.com/blog/2013/11/7/json-web-token-the-useful-little-standard-you-haven-t-heard-about

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-07
    • 1970-01-01
    • 2017-06-15
    • 1970-01-01
    • 1970-01-01
    • 2014-02-10
    相关资源
    最近更新 更多