How to use Firebase Auth with Astro
HTML-код
- Опубликовано: 29 июн 2024
- Join the early preview for my course! 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: github.com/coding-in-public/f...
---------------------------------------
🔗 Additional Links 🔗
- Firebase auth docs: firebase.google.com/docs/auth...
- Astro actions docs: docs.astro.build/en/reference...
- Astro middleware docs: 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: codinginpublic.dev
- Blog: chrispennington.blog
- Twitter: / cpenned
- Patreon: / coding_in_public
- Buy Me a Coffee: www.buymeacoffee.com/chrispen... Хобби
I"m loving these Astro videos!
Glad you like them! Go Astro!
You rock man! Thank you!!!
Glad it was a help!
Hey man, can you do supabase+Astro next? or lucia.
The best! ⬆⬆
Glad you found it helpful!
Only output server can be used or also output hybrid?
Also hybrid. Just make sure you mark routes you need SSR with prerender = false