This project was generated with Angular CLI version 8.3.19.
- Open Firebase Console
- Create a new Project
- Navigate to Authentication / Sign-in method
- Enable Google provider (only)
ng new fbauth
cd fbauth
npm install @angular/fire firebase --save
ng generate service services/auth
ng generate component components/index
ng generate component components/user-profile
ng generate guard guards/auth
- edit
app.module.tsto initialize firebase settings - edit
app-routing.module.tsto add routing rules - edit
user-profile.component.tsanduser-profile.component.htmlto setup Google login - edit
auth.guard.tsto implement permission check for routes
Google authentication handles only the login process.
You can restrict access (authorization) only by Firebase access rules: Firebase Console / Database / Rules .