Top
Email and password authentication with Firebase,
Social authentication with Facebook and Google, Twitter etc..
Manage Complete Database on Cloud
Hosting
Password recovery,
Verification emails,
Storing and accessing the authentication state using the browser's localStorage
There are also many other use of firebase that you can find from reference which we have attach below.
You must have the following prerequisites:
Recent versions of Node.js and NPM. You can install them from their official website,
Angular Cli installed (npm install -g @angular/cli)
1. setup firebase project in firebase console.
click on Get Started button
2. Add new project
create new project
Accept the controler-terms and click on Create Project
3. Go to Develop > Authentication
4. Get config object for your web app
To get the config object for a Firebase Web App:
>> Click the Settings icon, then select Project settings.
>> Go to the web app
>> In Your apps card, select the nickname of the app for which you need a config object.
>> Select Config from the Firebase SDK snippet pane.
>> Copy the config object snippet, then add it to your app's HTML.
copy config add on config.txt
5. Next, you'll need to enable Email authentication from the authentication > Sign-in method tab:
6. go to sign in method
Make disble toggle to enable, and save changes
7. Go to the authentication > Users tab then click on the Add user button and genarate email and password:
npm i @angular/fire
config file for auth0 manage inside the folder src >> environments >> environment.ts
cexport const environment = {
production: false,
firebase: {
apiKey: "YOUR_FIREBASE_KEY",
authDomain: "YOUR_FIREBASE_DOMAIN",
databaseURL: "YOUR_FIREBASE_DATABASE",
projectId: "YOUR_FIREBASE_PROJECT_ID",
storageBucket: "YOUR_FIREBASE_STORAGE_BUCKET",
messagingSenderId: "YOUR_FIREBASE_MESSAGEING_SENDER_ID",
appId: "YOUR_FIREBASE_API_ID"
}
};
The security rules read/write set as false means no one has access to the database.
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if false;
}
}
}
If you want to login only with firebase then you just need to follow below step.
1. Just un-comment below commented code from src >> app >> app-routing.module.ts
For Totally remove firebase from theme then check this video.