问题描述
将 Firebase 堆栈用于 chrome 扩展:) 但是,有一个大问题.
Using Firebase stack for chrome extensions :) However, have one BIG problem.
位于中国的用户无法使用该应用程序,因为谷歌在那里被屏蔽,因此 Firebase 身份验证失败......好吧,一种选择是使用 VPN,但就用户体验而言,这是一个很大的不不......有没有更好的解决/解决此问题的方法
Users located in China cant use the app since Google is blocked there thus Firebase authentication fails ... well, one option is to use VPN but in terms of user experience, it's a big No No ... is there any better way to resolve/workaround this issue
主要使用 firebase auth(Google 提供商)和 Firestore
Using mainly firebase auth (Google provider) and Firestore
可以使用某种方式自定义令牌来解决这个问题吗?https://firebase.google.com/docs/auth/admin/create-自定义令牌
Can use somehow custom tokens to resolve this?https://firebase.google.com/docs/auth/admin/create-custom-tokens
或者结合firebase的外部认证服务,在这种情况下,也需要对firestore进行认证访问
Or external authentication service combined with firebase, in this case, need to have authenticated access to firestore as well
推荐答案
在 HEROKU 上创建 API.让您的所有 Oauth 和对 firebase 的每次调用都通过 API.此 API 只会在中国和 GoogleServices (Firebase) 之间桥接所有信息,因为强大的防火墙会阻止它们.
Create an API on HEROKU. Make all your Oauth and every call made for firebase go through the API. This API will only bridge all information between CHINA and GoogleServices (Firebase) since the great firewall blocks them.
这篇关于在中国使用 Firebase 身份验证和 Firestore的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!