Android Firebase Google登录两个客户端
我需要使用android客户端和web客户端登录到相同的firebase应用程序。我该怎么做 从文档中,我了解到我们需要创建android类型的google OAuth客户端ID,对于web客户端,我们需要创建web应用程序类型的google OAuth客户端ID。一旦我们创建这两种不同类型的ID,我注意到在Firebase应用程序仪表板-google的登录和身份验证屏幕中,我们只能提到一个键Android Firebase Google登录两个客户端,android,firebase,firebase-security,firebase-authentication,Android,Firebase,Firebase Security,Firebase Authentication,我需要使用android客户端和web客户端登录到相同的firebase应用程序。我该怎么做 从文档中,我了解到我们需要创建android类型的google OAuth客户端ID,对于web客户端,我们需要创建web应用程序类型的google OAuth客户端ID。一旦我们创建这两种不同类型的ID,我注意到在Firebase应用程序仪表板-google的登录和身份验证屏幕中,我们只能提到一个键 如何处理这种情况?使用authWithOAuthToken方法解决了web客户端的问题 ref.aut
如何处理这种情况?使用authWithOAuthToken方法解决了web客户端的问题
ref.authWithOAuthToken("google", "<ACCESS-TOKEN>", function(error, authData) {
if (error) {
console.log("Login Failed!", error);
} else {
console.log("Authenticated successfully with payload:", authData);
}
});
ref.authWithOAuthToken(“谷歌”,函数(错误,authData){
如果(错误){
log(“登录失败!”,错误);
}否则{
log(“使用有效负载成功进行身份验证:”,authData);
}
});