I'm currently troubleshooting a minor issue with the
firebase.auth().getRedirectResult()
function in my Ionic 3 app. It seems that the function is not accessing the then
block as expected. Even after attempting to log the result and a random string, nothing shows up in the console. Can anyone identify what may be causing this issue?
Here's the code snippet for reference:
signInWithGoogle() {
const provider = new firebase.auth.GoogleAuthProvider();
return firebase.auth().signInWithRedirect(provider)
.then(() => {
firebase.auth().getRedirectResult()
.then(data => {
console.log(data); // No output
console.log('User signed in.'); // Still no output
})
.catch(error => {
console.log(error);
throw (error);
});
})
.catch(error => {
console.log(error);
throw (error);
});
}
Even though it successfully logs into the account, nothing is being logged to the console. Any insights on how to troubleshoot this further would be greatly appreciated.