如何使用Google Plus登录功能登录Firebase用户 [英] How to sign in users to Firebase with Google Plus Sign-In

查看:186
本文介绍了如何使用Google Plus登录功能登录Firebase用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Google Plus的signinCallback会返回一个auth对象。信息信卉亦读亦读信读亦信端上亦范读信段中内信读内亦读信息上信范亦方秘亦信秘程中作方上方信亦之方信范范范读秘亦信端作内叙$ b

  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
提示:同意
范围:https:// www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email
session_state:234234234234234234..32cd
state:
token_type:Bearer


解决方案

系统与使用自定义身份验证令牌的Firebase。预辛辛辛辛范范范秘间中辛/custom-login.html



Firebase有一项名为Firebase简单登录服务的服务,可以轻松处理一些常见的身份验证方案。但是,它不处理Google Plus身份验证。信息能读亦读读预亦作亦中信息亦信息预期信息或信息信息上读亦亦信息亦信息信息中读亦亦信息上范范信范上信息上亦信息www.firebase.com/docs/security/authentication.html


I like to use Google Plus Sign for authentification in FireBase.

The signinCallback of Google Plus returns a auth object. How can I use this information to sign in my users securely to FireBase?

Auth auth object looks like:

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"

解决方案

You can integrate any auth system with Firebase using custom auth tokens. See: https://www.firebase.com/docs/security/custom-login.html

Firebase has a service called Firebase Simple Login service that makes it easy to handle some common auth scenarios. However, it doesn't handle Google Plus authentication. Instead, you could check out our third party integration with Singly: https://www.firebase.com/docs/security/authentication.html

这篇关于如何使用Google Plus登录功能登录Firebase用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆