【问题标题】:OAuth with AngularJS使用 AngularJS 进行 OAuth
【发布时间】:2013-10-11 05:14:53
【问题描述】:

我正在尝试将社交身份验证添加到我使用 Yeoman 创建的项目中。但是回调有问题。它找不到我的本地服务器。

http://localhost:9000/oauth2callback#access_token=...

Cannot GET /oauth2callback

我发现这是节点 js 问题,在 stackoverflow 上提到了 there,但它不适用于路由中的 http://hostname/there,其中 grunt 连接模块与 Yeoman 种子应用程序中的其他连接模块冲突(也许我无法正确设置它)。

项目代码stored on github 并基于angular-oauth 有效。 This 是路由文件。这个项目很简单。

我也将感谢任何有关此问题或更通用解决方案的帮助。

【问题讨论】:

    标签: javascript node.js angularjs oauth


    【解决方案1】:

    这是我为 Angular App 和 Express JS 使用子域所采取的方法(两者是完全分离的代码,但共享相同的域名)。

    https://gist.github.com/amitaibu/6573250

    【讨论】:

      【解决方案2】:

      我在某人的 github 文件上找到了解决方案。 https://gist.github.com/zishe/6925726 效果很好!

      【讨论】:

        猜你喜欢
        • 2022-01-03
        • 2012-05-24
        • 1970-01-01
        • 1970-01-01
        • 2012-02-18
        • 1970-01-01
        • 2013-08-15
        • 2019-07-11
        • 2017-02-27
        相关资源
        最近更新 更多