これは私のコードです。を使用してauthenticate('google')
います。許可ボタンをクリックすると、エラー 404が表示されます。Google 認証にsatellizer.jsを使用しています。
このエラーを理解している場合は、私を助けてください。
ブラウザ POST のエラー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}
});