TLDR: got tired of setting up this lightweight stack over and over again for some clients so i made a template, and i'm just here to share to ya'll.
๐ญ Github Repository
๐ App Demo
Features
- ๐ Protected Routes
- ๐ Firebase User Object in Global Context via
useUser
- ๐ User Authentication
- ๐ Routing
It's also blazingly fast ๐ฅ No really, try it out for yourself.
Getting Started
- Clone the repository
- Install dependencies:
npm install
- Go to
./config.ts
and add your Firebase configuration - Run the app:
npm run dev
What you need to know
-
/router/index.tsx
is where you declare your routes -
/context/AuthContext.tsx
is where you can find theuseUser
hook- This hook gives you access to the
user
object from Firebase Auth globally
- This hook gives you access to the
-
/Providers.tsx
is where you can add moreproviders
orwrappers
mmvergara
/
react-firebase-auth-template
React Firebase Auth template with Protected Routes ๐ฅ
React Firebase Auth with Protected Routes
Features
- ๐ Protected Routes
- ๐ Firebase User Object in Global Context via
useUser
- ๐ User Authentication
- ๐ Routing
It's also blazingly fast ๐ฅ No really, try it out for yourself.
We also have a similar template for SUPABASE๐๐
Getting Started
- Clone the repository
- Install dependencies:
npm install
- Go to
./config.ts
and add your Firebase configuration - Run the app:
npm run dev
What you need to know
-
/router/index.tsx
is where you declare and manage your routes -
/context/AuthContext.tsx
is where you can find theuseUser
hook- This hook gives you access to the
user
object from Firebase Auth globally
- This hook gives you access to the
-
/Providers.tsx
is where you can add moreproviders
orwrappers
Top comments (1)
dev.to/mmvergara/react-supabase-au...
Made a similar template for supabase too ๐