From 25b1564275a9f6a7df730e062603259744741a10 Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Mon, 30 Apr 2018 20:13:51 +0200 Subject: [PATCH] Minor updates - wording and missing step in README.md - fix storage private rules regex - update firebasejs 4.13.0 - update firebaseui 2.7.0 --- README.md | 8 +++++--- firebase/hosting/index.html | 6 +++--- firebase/storage/storage-private.rules | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7e16b59..7e350d1 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,8 @@ The latest Android apk can also be downloaded [here](https://github.com/SimonMar cd firebase # Initialize Firebase (login popup) firebase login + # Set the default Firebase project + firebase use --add ``` - Add your first admin user (`uid` found in Firebase Authentication page) + Firebase Database, add admin `uid` @@ -160,15 +162,15 @@ The latest Android apk can also be downloaded [here](https://github.com/SimonMar #### Deploy -- Sync, build and install Android module from Android Studio - Test web app on your machine http://localhost:5000 ```bash firebase serve ``` -- Finally, deploy all Firebase modules (database, storage, hosting, functions) +- Deploy all Firebase modules (database, storage, hosting, functions) ```bash firebase deploy ``` +- Sync, build and install Android module from Android Studio ## Settings @@ -176,7 +178,7 @@ A lot of settings can be tweaked in both web and Android apps - Store icons and titles - Firebase auth providers - Maximum apk size -- Public with admin write access +- Admin write access - Store visibility (private or public) - … diff --git a/firebase/hosting/index.html b/firebase/hosting/index.html index 1601bf2..2fcca6f 100644 --- a/firebase/hosting/index.html +++ b/firebase/hosting/index.html @@ -18,9 +18,9 @@ - - - + + + diff --git a/firebase/storage/storage-private.rules b/firebase/storage/storage-private.rules index 485a0ad..cc82ce9 100644 --- a/firebase/storage/storage-private.rules +++ b/firebase/storage/storage-private.rules @@ -4,7 +4,7 @@ service firebase.storage { match /{applicationId} { match /image { allow read: if // User domain - request.auth.token.email.matches('^@domain\\.com$') && request.auth.token.email_verified && !request.auth.token.email in [ '' ]; + request.auth.token.email.matches('.*@domain\\.com$') && request.auth.token.email_verified; allow write: if // Admin uids request.auth.uid in [ ] && @@ -19,7 +19,7 @@ service firebase.storage { match /versions { match /{versionId} { allow read: if // User domain - request.auth.token.email.matches('^@domain\\.com$') && request.auth.token.email_verified && !request.auth.token.email in [ '' ]; + request.auth.token.email.matches('.*@domain\\.com$') && request.auth.token.email_verified; allow write: if // Admin uids request.auth.uid in [ ] &&