Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sql-server-2005/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Google标识的Firebase身份验证(GoogleYOLO)_Firebase_Firebase Authentication_Google Identity Toolkit_Google Identity - Fatal编程技术网

使用Google标识的Firebase身份验证(GoogleYOLO)

使用Google标识的Firebase身份验证(GoogleYOLO),firebase,firebase-authentication,google-identity-toolkit,google-identity,Firebase,Firebase Authentication,Google Identity Toolkit,Google Identity,是否可以将Google Identity(GoogleYOLO)与Firebase身份验证web堆栈相结合?如果是,怎么做?谢谢 您可以使用Firebase Auth使用Google Yolo登录,如下所示: hintPromise.then((credential) => { if (credential.idToken) { // Initialize firebase Auth credential with Google ID token // obtained

是否可以将Google Identity(GoogleYOLO)与Firebase身份验证web堆栈相结合?如果是,怎么做?谢谢

您可以使用Firebase Auth使用Google Yolo登录,如下所示:

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.
});

如果您需要示例,FirebaseUI通常会实现所有模式:-您能再多说一点您希望集成的功能吗(一般来说:一切都可以工作!)当然。我的应用程序使用自定义Firebase身份验证系统,而不是Firebase UI。我利用谷歌目前的登录,但希望用户能够登录,而不必说注册页面。但是,我想知道如何将firebase auth后端与Google YOLO连接(我们如何保存auth?),例如:我可以利用firebase.auth.signInWithGoogle()通过单击按钮登录Google,firebase auth将保存并处理后端的数据传递。谷歌YOLO可以做到这一点吗?嘿,布兰登,这是Android还是Web?@bojeil这是Ian提到的Web(firebase js),你应该看看FirebaseUI Web,它已经集成了一次点击注册和自动登录:这太棒了!非常感谢@bojeil!我在想,这必须用
firebase.auth.GoogleAuthProvider
来完成,但我不知道我必须使用
登录凭据