I have the Google Signin Button properly rendering inside my react component using the gapi.signin2.render method on the latest Google platform web-client api (https://apis.google.com/js/platform.js).
But, for the life of me, I can't get it to properly call my success or failure callbacks.
The button renders, clicking the button opens the account auth window, clicking a Google account closes the window, but no callback.
function myCallback(obj) {
console.log(obj);
}
gapi.signin2.render('my-signin2', {
scope: 'https://www.googleapis.com/auth/plus.login',
width: 200,
height: 50,
longtitle: true,
theme: 'dark',
onsuccess: myCallback,
onfailure: myCallback
});
I have no clue what I'm missing here. Any help is much appreciated!