0

我需要使用 android 客户端和 web 客户端登录到同一个 firebase 应用程序。我怎样才能做到这一点?

从文档中,我知道我们需要创建 android 类型的 google OAuth 客户端 ID,对于 Web 客户端,我们需要创建 Web 应用类型类型的 google OAuth 客户端 ID。一旦我们创建了这两种不同类型的 ID,我注意到在 Firebase App Dashboard - Google Login And Auth Screen 中,我们只能提到一个键。

我该如何处理这种情况?

4

1 回答 1

0

使用 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);
  }
});
于 2015-09-23T06:00:42.410 回答