@hadx/firebase
v0.0.5
Published
@hadx/firebase
Downloads
6
Readme
Hadex Firebase
Getting started
Create a new project on firebase console (ex: MyApp)
Create Firestore database with
Rules
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
- Enable Email/Password Authentication and add a new user, note down the email and password
- Install this package
yarn add @hadx/firebase
- Add a Web App to the project
- Copy and save the firebaseConfig part to your code
Usage
import Firebase from '@hadx/firebase';
const auth = {email: ..., password: ...} // create above (step 3)
const config = {...}; // copied above (step 6)
Firebase.initialize(config, auth, 'myApp');