How to use Firebase Auth with Astro

Опубликовано: 19 Март 2026
на канале: Coding in Public
5,390
190

Join the early preview for my course! https://learnastro.dev

Use FIREBASE_AUTH for $20 off.

SAAS products like Firebase make authentication easy to implement. You need three items:
1. A POST api endpoint
2. Firebase auth
3. Middleware to protect the routes

🔗 Key Links 🔗
Github: https://github.com/coding-in-public/f...

---------------------------------------

🔗 Additional Links 🔗
Firebase auth docs: https://firebase.google.com/docs/auth...
Astro actions docs: https://docs.astro.build/en/reference...
Astro middleware docs: https://docs.astro.build/en/guides/mi...

---------------------------------------

⏲️ Timestamps ⏲️
0:00 Introduction
1:43 New account form
4:43 Add Firebase
6:55 Setup Astro Actions
9:20 New account POST
18:00 Basic Middleware
21:14 Login form/POST
23:16 Logout form/POST
23:35 Middleware route protection

---------------------------------------

🌐 Connect With Me 🌐
Website: https://codinginpublic.dev
Blog: https://chrispennington.blog
Twitter:   / cpenned  
Patreon:   / coding_in_public  
Buy Me a Coffee: https://www.buymeacoffee.com/chrispen...