Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 feature/login #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "my-shop-bacolod-prep"
}
}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.DS_Store
.DS_Store
firebase-debug.log
node_modules
16 changes: 16 additions & 0 deletions auth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Setup to Authenticate

1. Create a firebase project
* go to https://console.firebase.google.com/u/0/
2. Install and setup firebase tools
* install npm https://www.npmjs.com/get-npm
* install firebase tools using the command `npm install -g firebase-tools`
* login using the command `firebase login`
3. Initialize the firebase project
* Intialize a project using the command `firebase init`
* run local server `firebase serve`
4. Setup firebase to be available in your code
* copy the config
![image](setup1.png)
5. Setup Authentication
![image](setup-signin.png)
17 changes: 17 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
},
"storage": {
"rules": "storage.rules"
}
}
14 changes: 14 additions & 0 deletions firestore.indexes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Example:
//
// "indexes": [
// {
// "collectionId": "widgets",
// "fields": [
// { "fieldPath": "foo", "mode": "ASCENDING" },
// { "fieldPath": "bar", "mode": "DESCENDING" }
// ]
// }
// ]
"indexes": []
}
7 changes: 7 additions & 0 deletions firestore.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write;
}
}
}
8 changes: 8 additions & 0 deletions functions/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const functions = require('firebase-functions');

// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
// exports.helloWorld = functions.https.onRequest((request, response) => {
// response.send("Hello from Firebase!");
// });
Loading