2
我想在一個角度的應用程序內部集成谷歌身份工具包,但流量不是和谷歌身份工具包窗口小部件調用谷歌API後返回錯誤。這是路由重定向後,它是一個空白頁http://localhost:8000/?mode=select/#/GoogleIdentity谷歌身份工具包返回INVALID_RESPONSE
POST/verifyAssertion
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "INVALID_RESPONSE"
}
],
code": 400,
"message": "INVALID_RESPONSE"
}
}
這裏是我的代碼:
.controller('GoogleIdentityCtrl', ['$scope', '$rootScope', function ($scope, $rootScope, localStorageService) {
var config = {
apiKey: 'dkfjdslfjeoi-not-real-api-key',
signInSuccessUrl: '/',
idps: ['google'],
oobActionUrl: 'http://localhost:8000/#/GoogleIdentity',
siteName: 'this site',
};
window.google.identitytoolkit.start('#gitkitWidgetDiv', config, 'JAVASCRIPT_ESCAPED_POST_BODY');
}]);
window.google.identitytoolkit.signInButton('#navbar', { widgetUrl: 'http://localhost:8000/#/GoogleIdentity', signOutUrl: '/'' });
你能解決這個問題嗎?我有一個可以發佈的解決方案。 –