Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
Minor updates
Browse files Browse the repository at this point in the history
- wording and missing step in README.md
- fix storage private rules regex
- update firebasejs 4.13.0
- update firebaseui 2.7.0
  • Loading branch information
SimonMarquis committed Apr 30, 2018
1 parent 78c5fe2 commit 25b1564
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -160,23 +162,23 @@ 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

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)
- …

Expand Down
6 changes: 3 additions & 3 deletions firebase/hosting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script defer src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>

<script defer src="https://www.gstatic.com/firebasejs/4.10.1/firebase.js"></script>
<script defer src="https://cdn.firebase.com/libs/firebaseui/2.6.2/firebaseui.js"></script>
<link defer type="text/css" rel="stylesheet" href="https://cdn.firebase.com/libs/firebaseui/2.6.1/firebaseui.css" />
<script defer src="https://www.gstatic.com/firebasejs/4.13.0/firebase.js"></script>
<script defer src="https://cdn.firebase.com/libs/firebaseui/2.7.0/firebaseui.js"></script>
<link defer type="text/css" rel="stylesheet" href="https://cdn.firebase.com/libs/firebaseui/2.7.0/firebaseui.css" />
<script defer src="index.js"></script>

<style type="text/css">html{width:100vw;overflow-x:hidden}body{padding-top:1.5rem;padding-bottom:1.5rem}@media (min-width:48em){.container{max-width:46rem}}</style>
Expand Down
4 changes: 2 additions & 2 deletions firebase/storage/storage-private.rules
Original file line number Diff line number Diff line change
Expand Up @@ -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 [ ]
&&
Expand All @@ -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 [ ]
&&
Expand Down

0 comments on commit 25b1564

Please sign in to comment.