DEV Community

Cover image for Integrate Angular 13 with Firebase Auth
Jozsef
Jozsef

Posted on

Integrate Angular 13 with Firebase Auth

@angular/fire version 7.2.0 and Angular 13.2.0 are used !

Create a separate module for auth responsibility, the structure will look like this:

auth module structure

auth.module.ts

auth.module.ts

make sure that you have the correct credentials in environment.ts and environment.prod.ts

auth credentials

select Project settings and you can find there your web app's Firebase configuration

auth.service.ts

auth.service.ts

I think it is better to handle observables in Angular than promises, that's why I used rxjs from which create observable from promise, you can read the official docs here

auth.component.ts

auth component

You can find the app on this repository

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

While many AI coding tools operate as simple command-response systems, Qodo Gen 1.0 represents the next generation: autonomous, multi-step problem-solving agents that work alongside you.

Read full post

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Instrument, monitor, fix: a hands-on debugging session

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️