是否可以将Google身份(GoogleYOLO)与Firebase身份验证网络堆栈结合使用?如果是这样,怎么样?谢谢!
答案 0 :(得分:6)
您可以使用Firebase Auth使用googleyolo登录,如下所示:
hintPromise.then((credential) => {
if (credential.idToken) {
// Initialize firebase Auth credential with Google ID token
// obtained from googleyolo.
const cred = firebase.auth.GoogleAuthProvider.credential(credential.idToken);
// Sign in with
return firebase.auth().signInWithCredential(cred);
}
throw new Error;
}).then((result) => {
// User signed in.
}).catch((error) => {
// Handle error.
});