Authentication
- Firebase Auth initialized in
apps/web/src/lib/firebase.jswith local persistence. - Context:
apps/web/src/context/AuthContext.jsprovides user/session to the app. - Middleware:
apps/web/middleware.jshandles public vs protected routes using an auth token cookie (firebase-token). - HOC:
apps/web/src/components/auth/withAuth.jsfor client-side route protection. - Cookie:
AuthContextwritesfirebase-tokenviagetIdToken()for SSR/middleware checks.