angularjs – AngularStack Facebook,Google和Twitter身份验证
发布时间:2020-12-17 16:57:25 所属栏目:安全 来源:网络整理
导读:我正在使用Generator Angular Fullstack创建我的第一个Web应用程序.我在这里完成了项目初始化: https://github.com/DaftMonk/generator-angular-fullstack 在初始化期间,我为以下内容设置了oAuth:Facebook,Google,Twitter 我也在使用Openshift,在初始化项
我正在使用Generator Angular Fullstack创建我的第一个Web应用程序.我在这里完成了项目初始化:
https://github.com/DaftMonk/generator-angular-fullstack
在初始化期间,我为以下内容设置了oAuth:Facebook,Google,Twitter 我也在使用Openshift,在初始化项目之后……我用步骤将它添加到openshift.这包括为Facebook,Google和Twitter身份验证设置RHC的环境变量.我也添加了这些. 但是,使用我的新应用程序……我无法使用Facebook,Google或Twitter创建新帐户. Facebook的: Invalid App ID: id 谷歌 : 401. That’s an error. Error: invalid_client The OAuth client was not found. Request Details scope=https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email response_type=code redirect_uri=http://site.rhcloud.com/auth/google/callback client_id=id That’s all we know. 推特: Internal Server Error 到目前为止,除了完成教程之外,我还没有做太多.但我觉得我错过了什么.关于这个主题的任何帮助都将是grea.t谢谢:) 解决方法
首先,您必须配置clientID,clientSecrets和callBackURL.您需要在每个oAuth提供商的开发者平台页面上找到这些内容.即对于Facebook,这将是:
https://developers.facebook.com/apps/
这些可以放在local.env.js文件中(包含一个示例,如下所示: module.exports = { DOMAIN: 'http://localhost:9000',SESSION_SECRET: "xxxxxxxxxxxxx",FACEBOOK_ID: 'xxxxxxx',FACEBOOK_SECRET: 'xxxxxxx',TWITTER_ID: 'xxxxxxx',TWITTER_SECRET: 'xxxxxx',GOOGLE_ID: 'xxxxxxx',GOOGLE_SECRET: 'xxxxxxx',..... }; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |