如何使用Google Plus登录将用户登录到Firebase

时间:2013-04-02 09:15:27

标签: authentication google-plus firebase

我喜欢使用Google Plus Sign在FireBase中进行身份验证。

Google Plus的signinCallback会返回一个身份验证对象。 如何使用此信息将我的用户安全地登录到FireBase?

Auth auth对象如下所示:

access_token: "ya29.2342324234"
authuser: "0"
client_id: "23ss4443234"
code: "4/tLijpRBvHp9hDNc-hcZk00bqvpz4.2342342"
cookie_policy: "single_host_origin"
expires_at: "136334897186"
expires_in: "3600"
g-oauth-window: Window
g_user_cookie_policy: "single_host_origin"
id_token: "324234234234.234234234.bW--234234---E2-Hj1I"
issued_at: "1364893586"
prompt: "consent"
scope: "https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email"
session_state: "234234234234234234..32cd"
state: ""
token_type: "Bearer"

1 个答案:

答案 0 :(得分:3)

您可以使用自定义身份验证令牌将任何身份验证系统与Firebase集成。看到: https://www.firebase.com/docs/security/custom-login.html

Firebase有一项名为Firebase简单登录服务的服务,可以轻松处理一些常见的身份验证方案。但是,它不处理Google Plus身份验证。相反,您可以查看我们与Singly的第三方集成: https://www.firebase.com/docs/security/authentication.html