Google login callback always shows "immediate_file"

I am trying to integrate Google login on my site. I followed the google developer code. Link: https://developers.google.com/+/web/signin/add-button

But I always get the response result as “immediate” from the signinCallback function. Does anyone know a solution for this?

function signinCallback(authResult) {
 if (authResult['status']['signed_in']) {

// Update the app to reflect a signed in user
// Hide the sign-in button now that the user is authorized, for example:
document.getElementById('signinButton').setAttribute('style', 'display: none');

} else {

// Update the app to reflect a signed out user
// Possible error values:
//   "user_signed_out" - User is signed-out
//   "access_denied" - User denied access to your app
//   "immediate_failed" - Could not automatically log in the user
console.log('Sign-in state: ' + authResult['error']);

}
}
+2
source share

Source: https://habr.com/ru/post/1538864/


All Articles