> Canonical URL: https://codingcat.dev/course/angularmaterial/lesson/firebase-authentication-and-authorization

# Firebase Authentication and Authorization | Angular Material | CodingCat.dev Course

[🧶 Angular Material](/course/angularmaterial)Section 1.3 · Lesson 3 of 8[![](/logos/firebase/firebase-symbol.png)![](/logos/firebase/firebase-symbol.png)Firebase](/topic/firebase)[#Security](/topic/security)[![](/logos/tags/angular-symbol-light.svg)![](/logos/tags/angular-symbol-dark.svg)Angular](/topic/angular)[![](/logos/tags/github-symbol-light.svg)![](/logos/tags/github-symbol-dark.svg)GitHub](/topic/github)[![](/logos/tags/html-symbol-light.svg)![](/logos/tags/html-symbol-dark.svg)HTML](/topic/html)[![](/logos/tags/auth0-symbol-light.svg)![](/logos/tags/auth0-symbol-dark.svg)Auth0](/topic/auth0)[← Prev Lesson](/course/angularmaterial/lesson/angular-material-router-outlet)[Next Lesson →](/course/angularmaterial/lesson/angular-material-theming)

# Firebase Authentication and Authorization

![](https://cdn.sanity.io/media-libraries/mlttp0BZbCpV/images/72ca81aa1ccdd077811aeed38de3eeefa8b66860-1920x1080.png?w=1920&h=1080&q=82&fit=max&auto=format)[@CodingCatDev62.5K / 100K Subscribers Goal](https://www.youtube.com/@codingcatdev?sub_confirmation=1)[Subscribe on YouTube→](https://www.youtube.com/@codingcatdev?sub_confirmation=1)[Watch on YouTube App ↗](https://www.youtube.com/watch?v=II6TAjPWg54&list=UUnKZ8gEb78zXKMi1ns-IQ2g)Lesson 3 / 8Course Lessons Outline▾1Section 1
- [1.1Firebase Project Hosting](/course/angularmaterial/lesson/firebase-project-hosting)
- [1.2Angular Material Router Outlet](/course/angularmaterial/lesson/angular-material-router-outlet)
- [1.3Firebase Authentication and Authorization](/course/angularmaterial/lesson/firebase-authentication-and-authorization)
- [1.4Angular Material Theming](/course/angularmaterial/lesson/angular-material-theming)
- [1.5Angular Material Dynamic Navigation using Firestore](/course/angularmaterial/lesson/angular-material-dynamic-navigation-using-firestore)
- [1.6Angular Material Forms from Firestore](/course/angularmaterial/lesson/angular-material-forms-from-firestore)
- [1.7Angular Material Reactive Forms Update Firestore](/course/angularmaterial/lesson/angular-material-reactive-forms-update-firestore)
- [1.8Angular Material Router Awareness](/course/angularmaterial/lesson/angular-material-router-awareness)

> ⚠️ Notice: I may need to reshoot this video as FirebaseUI is up to v4.1.0v4.0.0 Removed all FirebaseUI underlying dependencies on deprecated and removed APIs in Firebase version 6.0.0. FirebaseUI no longer supports versions older than 6.0.0.

We will continue building out our app to Authorize users and then add Firestore rules to Authenticate within our Angular application. One of my favorite full time authentication companies is [Auth0](https://auth0.com/). Auth0 has many great articles, the one I refer to when trying to teach others about AuthN vs. AuthZ is [Authentication and Authorization](https://auth0.com/docs/authorization/concepts/authz-and-authn).The biggest takeaway is this:

- `Autentication (AuthN)` Determines whether users are who they claim to be
- `Authorization (AuthZ)` Determines what users can and cannot access

## Setup

We can start from the previous lesson and build upon it by adding AuthN and AuthZ. Previous Lesson: [Angular Material Router Awareness](https://github.com/AJONPLLC/lesson14-angular-material-router-awareness)

Copied! 🐾

```
git clone
```

This will give us a solid base to start working from, however if you are creating a new firebase project you should change the environment/environment.ts file to match your firebase details. If you have never done this please see [Angular Navigation Firestore](https://ajonp.com/courses/angularmaterial/angular-material-dynamic-navigation-using-firestore) as this will provide more details on how to update.Make sure you update your npm packages

Copied! 🐾

```
npm install
```

## Firebase Authentication (AuthN)

The [Firebase Authentication](https://firebase.google.com/docs/auth/) docs have a great amount of detail on how exactly this works for each of their SDKs that they support. When I originally made this video I don't believe that [FirebaseUI](https://firebase.google.com/docs/auth/web/firebaseui) was fully supported and added to the documentation, but it is now. You can still find the main [github repo](https://github.com/firebase/firebaseui-web), which has several issues, but Authentication is the baine of my existence!Thankfully Firebase makes this super simple and I am going to show you how.

### FirebaseUI install

FirebaseUI was always a seperate project but it gained huge amounts of popularity. It is a simple drop in solution for authentication that was much needed for Web based authentication with Firebase.First we will need to add `firebaseui` to our npm package dependencies.

Copied! 🐾

```
npm i firebaseui@3.5.2
```

### Create User Module

Using the [Angular CLI](https://angular.io/cli) to create modules and components. You can find specific details about this schematic in the [ng generate CLI section](https://angular.io/cli/generate).

- `ng g m` is a sort hand for `ng generate module`, more can be found [here](https://angular.io/cli/generate#module)
- `modules/user` is the directory from `src/app` where the module will be located.
- `-routing` adds the routing module

Copied! 🐾

```
ng g m modules/user --routing
```

### Create User Signin Component

Using the [Angular CLI](https://angular.io/cli) to create modules and components. You can find specific details about this schematic in the [ng generate CLI section](https://angular.io/cli/generate).

- `ng g c` is a sort hand for `ng generate component`, more can be found [here](https://angular.io/cli/generate#component)
- `modules/user-signin` is the directory from `src/app` where the module will be located, this command will also understand that we want to add this component to the already generated module.

Copied! 🐾

```
ng g c modules/user-signin
```

You should see an output similar to below: Loading image...

### Update User Signin Template

We just need a very simple div so that firebaseUI can locate the ID and then inject itself.[/src/app/modules/user/user-signin/user-signin.component.html](https://github.com/AJONPLLC/lesson15-firebase-AuthZ-AuthN/blob/47f8096c133371ac5d9116c0622abc01d553f100/src/app/modules/user/user-signin/user-signin.component.html#L1)

Copied! 🐾

```

```

✏️ Visual Architecture Diagram

## how this course connects together.

Follow AJ through the layered stack topology from input contract to production output.

Let’s build it!✏️ Architecture Diagram: Angular Material: Firebase Authentication and Au…LAYERED SYSTEM STACKARCHITECTURE DIAGRAM[Diagram Walkthrough]Content-driven layered-stack diagram for Angular Material: Firebase Authentication and Authorization: Section 1 -> Angular Material -> Verified Production Artifact.AAA Contrast Verified

## related deep dives.

[View All&rarr;](/blog)[![The Odin Project 5: Advanced HTML, CSS View Transitions & WCAG Accessibility](https://cdn.sanity.io/images/hfh83o0w/production/93736ccee5b8c088a202f319ce1223899a41f6bf-1376x768.png?w=1376&q=82&fit=max&auto=format)](/course/odin-advanced-html-css-and-a11y)November 4, 2026[![](/logos/tags/css-symbol-light.svg)![](/logos/tags/css-symbol-dark.svg)CSS](/topic/css)[#Accessibility](/topic/a11y)[![](/logos/tags/html-symbol-light.svg)![](/logos/tags/html-symbol-dark.svg)HTML](/topic/html)[+1](/course/odin-advanced-html-css-and-a11y)

### [The Odin Project 5: Advanced HTML, CSS View Transitions & WCAG Accessibility](/course/odin-advanced-html-css-and-a11y)

Build 60fps GPU-accelerated animations, multi-page Astro View Transitions, WCAG AAA focus rings, and accessible native <dialog> and Popover components.

[![Alex Patterson](https://cdn.sanity.io/media-libraries/mlttp0BZbCpV/images/a606dfaa381aab08ddbe16a33fe1d3e1fb37c927-400x400.jpg?w=96&h=96&q=82&fit=max&auto=format)Alex Patterson](/author/alex-patterson)[![The Odin Project 3: Intermediate HTML, Modern Forms & CSS Grid Architecture](https://cdn.sanity.io/images/hfh83o0w/production/e81cb7bdd395cf1351722a2e6357da97cc3c1ed6-1376x768.png?w=1376&q=82&fit=max&auto=format)](/course/odin-intermediate-html-and-css-grid)November 4, 2026[![](/logos/tags/css-symbol-light.svg)![](/logos/tags/css-symbol-dark.svg)CSS](/topic/css)[![](/logos/tags/html-symbol-light.svg)![](/logos/tags/html-symbol-dark.svg)HTML](/topic/html)[#Design](/topic/design)[+1](/course/odin-intermediate-html-and-css-grid)

### [The Odin Project 3: Intermediate HTML, Modern Forms & CSS Grid Architecture](/course/odin-intermediate-html-and-css-grid)

Master 2D CSS Grid layouts, Subgrid, CSS Custom Properties, fluid clamp() typography, container queries, and zero-JS form validation with :user-valid.

[![Alex Patterson](https://cdn.sanity.io/media-libraries/mlttp0BZbCpV/images/a606dfaa381aab08ddbe16a33fe1d3e1fb37c927-400x400.jpg?w=96&h=96&q=82&fit=max&auto=format)Alex Patterson](/author/alex-patterson)[Course Outline](/course/angularmaterial)

## Angular Material

3/81

### Section 1

- [1.1Firebase Project Hosting](/course/angularmaterial/lesson/firebase-project-hosting)
- [1.2Angular Material Router Outlet](/course/angularmaterial/lesson/angular-material-router-outlet)
- [1.3Firebase Authentication and Authorization▶](/course/angularmaterial/lesson/firebase-authentication-and-authorization)
- [1.4Angular Material Theming](/course/angularmaterial/lesson/angular-material-theming)
- [1.5Angular Material Dynamic Navigation using Firestore](/course/angularmaterial/lesson/angular-material-dynamic-navigation-using-firestore)
- [1.6Angular Material Forms from Firestore](/course/angularmaterial/lesson/angular-material-forms-from-firestore)
- [1.7Angular Material Reactive Forms Update Firestore](/course/angularmaterial/lesson/angular-material-reactive-forms-update-firestore)
- [1.8Angular Material Router Awareness](/course/angularmaterial/lesson/angular-material-router-awareness)

@CodingCatDev on YouTube62.5K / 100K

Subscribe for new course lessons and architecture deep dives every week.

[Subscribe for New Lessons →](https://www.youtube.com/@codingcatdev?sub_confirmation=1)