简体   繁体   English

Firebase 自定义身份验证与 Gigya

[英]Firebase custom auth with Gigya

My goal is to integrate Firebase Realtime Database within my Android app which already has an authentication layer (Gigya) that isn't managed by me.我的目标是将 Firebase 实时数据库集成到我的 Android 应用程序中,该应用程序已经有一个不由我管理的身份验证层 (Gigya)。

The DB structure could be:数据库结构可以是:

{
 "users": 
     "gigya_id1": {
          // user's objects
    },
     "gigya_id2": {
          // user's objects
    }, 

    .....
}

I also want to add a little of security and rules to avoiding that a user can't READ/WRITE other users stuff.我还想添加一些安全性和规则来避免用户无法读取/写入其他用户的东西。

I read about firebase custom auth but as I said, I don't have access to backend (and there is not doc about gigya custom token and firebase integration)我阅读了有关firebase 自定义身份验证的信息,但正如我所说,我无权访问后端(并且没有关于 gigya 自定义令牌和 firebase 集成的文档)

Does anyone have experienced with an integration like this one?有没有人经历过这样的集成?

What you want to do can be achieved pretty easily.你想做的事情可以很容易地实现。

You can pull the JWT from Gigya whenever a user authenticates by calling to每当用户通过调用

gigya.accounts.getJWT()

And pass the JWT in the response from Gigya to the custom auth method in Firebase, following this guidelines: https://firebase.google.com/docs/auth/web/custom-auth并按照以下指南将 Gigya 的响应中的 JWT 传递给 Firebase 中的自定义身份验证方法: https ://firebase.google.com/docs/auth/web/custom-auth

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM