I would like interegrate google identity toolkit inside an angular app but after flow is not and calls to google api by the google identity kit widget is returning errors. This is the route after redirecting and it's an empty page http://localhost:8000/?mode=select/#/GoogleIdentity
POST /verifyAssertion
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "INVALID_RESPONSE"
}
],
code": 400,
"message": "INVALID_RESPONSE"
}
}
Here is my code:
.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: '/'' });