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.
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