git clone [email protected]:Northwind01/gem2.git
cd gem2
npm install
npm start
- visit http://localhost:3000
- copy/paste your configuration from your Firebase project's dashboard into one of these files
- src/components/Firebase/firebase.js file
- .env file
- .env.development and .env.production files
The .env or .env.development and .env.production files could look like the following then:
REACT_APP_API_KEY=XXXX
REACT_APP_AUTH_DOMAIN=XXXX
REACT_APP_DATABASE_URL=XXXX
REACT_APP_PROJECT_ID=XXXX
REACT_APP_STORAGE_BUCKET=XXXX
REACT_APP_MESSAGING_SENDER_ID=XXXX
- Email/Password
- Troubleshoot
- add a redirect URL for redirecting a user after an email verification into one of these files
- src/components/Firebase/firebase.js file
- .env file
- .env.development and .env.production files
The .env or .env.development and .env.production files could look like the following then (excl. the Firebase configuration).
Development:
REACT_APP_CONFIRMATION_EMAIL_REDIRECT=http://localhost:3000
Production:
REACT_APP_CONFIRMATION_EMAIL_REDIRECT=https://mydomain.com
{
"rules": {
".read": false,
".write": false,
"users": {
"$uid": {
".read": "$uid === auth.uid || root.child('users/'+auth.uid).child('roles').hasChildren(['ADMIN'])",
".write": "$uid === auth.uid || root.child('users/'+auth.uid).child('roles').hasChildren(['ADMIN'])"
},
".read": "root.child('users/'+auth.uid).child('roles').hasChildren(['ADMIN'])",
".write": "root.child('users/'+auth.uid).child('roles').hasChildren(['ADMIN'])"
},
"messages": {
".indexOn": ["createdAt"],
"$uid": {
".write": "data.exists() ? data.child('userId').val() === auth.uid : newData.child('userId').val() === auth.uid"
},
".read": "auth != null",
".write": "auth != null",
},
}
}