Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Firebase authentication and Firestore in China

Tags:

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

like image 283
alexpov Avatar asked Sep 13 '18 07:09

alexpov


People also ask

Does Firebase authentication work in China?

Unfortunately, Firebase does not work in China.

Does firestore work in China?

For now Firebase is blocked and can't be used in China, along with other Google services, because the PRC has blocked all URIs with *. google.com and *. googleapis.com. This also means, for example, that the Play app store can't be accessed from China.

Does Firebase authentication use firestore?

To build user-based and role-based access systems that keep your users' data safe, you need to use Firebase Authentication with Cloud Firestore Security Rules. Note: The server client libraries bypass all Cloud Firestore Security Rules and instead authenticate through Google Application Default Credentials.

Is firestore multi region?

You can store your Cloud Firestore data in a multi-region location or a regional location. Note that if you already have an App Engine app with a location of either us-central or europe-west , your Cloud Firestore database will be considered multi-regional.


1 Answers

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.

like image 183
Christophe Chenel Avatar answered Sep 27 '22 23:09

Christophe Chenel