googleLogin(): Promise<any> { | |
return new Promise((resolve, reject) => { | |
this.googlePlus.login({ | |
'webClientId': '5351366995-npuh9q89gaoiagoc4jssqck26gorj7hh.apps.googleusercontent.com', | |
'offline': true | |
}).then( res => { | |
const googleCredential = firebase.auth.GoogleAuthProvider | |
.credential(res.idToken); | |
firebase.auth().signInWithCredential(googleCredential) | |
.then( response => { | |
console.log("Firebase success: " + JSON.stringify(response)); | |
resolve(response) | |
}); | |
}, err => { | |
console.error("Error: ", err) | |
reject(err); | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment