这是我的密码。我正在使用authenticate('google')。单击“允许”按钮后,我得到错误404。我正在使用satellizer.js进行谷歌身份验证。
如果您理解这个错误,请帮助我。
浏览器发布http://localhost:8080/auth/google 404时出错(未找到)
Object {data: "Cannot POST /auth/google↵", status: 404, config: Object, statusText: "Not Found"}内部控制器
$scope.authenticate = function (provider) {
$auth.link(provider)
.then(function(response) {
// You have successfully linked an account.
console.log(response);
})
.catch(function(response) {
// Handle errors here.
console.log('----------error--------')
console.log(response);
});
};我在app.js中的代码
$authProvider.google({
clientId: 'xxxxxxxxxx2op4madn.apps.googleusercontent.com'
});
$authProvider.google({
url: '/auth/google',
authorizationEndpoint: 'https://accounts.google.com/o/oauth2/auth',
redirectUri: window.location.origin || window.location.protocol + '//' + window.location.host,
requiredUrlParams: ['scope'],
optionalUrlParams: ['display'],
scope: ['profile', 'email'],
scopePrefix: 'openid',
scopeDelimiter: ' ',
display: 'popup',
type: '2.0',
popupOptions: {width: 452, height: 633}
});发布于 2015-12-22 11:55:51
我遇到了问题,实际上是在这个URL上找到了一个post请求,您可以在您的server.js文件中添加一些配置,遵循这个给定的GIT。
https://stackoverflow.com/questions/34264575
复制相似问题