Using Firebase authentication and Firestore in China

强颜欢笑 提交于 2019-12-09 14:47:35

问题


Using Firebase stack for chrome extensions :) However, have one BIG problem.

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

Using mainly firebase auth (Google provider) and Firestore

Can use somehow custom tokens to resolve this? https://firebase.google.com/docs/auth/admin/create-custom-tokens

Or external authentication service combined with firebase, in this case, need to have authenticated access to firestore as well


回答1:


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.




回答2:


The simplest solution may be to set up a proxy server to forward your apps requests to Firebase.



来源:https://stackoverflow.com/questions/52308437/using-firebase-authentication-and-firestore-in-china

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!