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/firebase-astro-auth
---------------------------------------
? Additional Links ?
- Firebase auth docs: https://firebase.google.com/docs/auth/web/start
- Astro actions docs: https://docs.astro.build/en/reference/configuration-reference/#experimentalactions
- Astro middleware docs: https://docs.astro.build/en/guides/middleware/
---------------------------------------
⏲️ 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: https://twitter.com/cpenned
- Patreon: https://www.patreon.com/coding_in_public
- Buy Me a Coffee: https://www.buymeacoffee.com/chrispennington