angular-google-signin
angular-google-signin copied to clipboard
Problem with returning data to view
I can show the popup where you enter the email and password and the text of the button changes, but it does not return the data to the component to display in the view or console. That could be happening? I also put some messages in console in the function onGoogleSignInSuccess but it does not return them to me ...
Bye!
Could you upload an example to see how you implement it?
I have facing same issue please help me .
Object {error: "idpiframe_initialization_failed", details: "Not a valid origin for the client: http://localhos…itelist this origin for your project's client ID."} details : "Not a valid origin for the client: http://localhost:4200 has not been whitelisted for client ID myclientId.apps.googleusercontent.com. Please go to https://console.developers.google.com/ and whitelist this origin for your project's client ID." error : "idpiframe_initialization_failed"
this is component file code but not getting any response. onGoogleSignInSuccess(event: GoogleSignInSuccess) { console.log(event); let googleUser: gapi.auth2.GoogleUser = event.googleUser; console.log(googleUser);
let id: string = googleUser.getId();
let profile: gapi.auth2.BasicProfile = googleUser.getBasicProfile();
console.log('ID: ' +
profile
.getId()); // Do not send to your backend! Use an ID token instead.
console.log('Name: ' + profile.getName());
}
Hi! I will look into it this weekend, bare with me!