Skip to content

Latest commit

 

History

History
65 lines (52 loc) · 1.28 KB

File metadata and controls

65 lines (52 loc) · 1.28 KB

Development Setup

  1. Clone the repository
git clone <repository-url>
cd murmur
  1. Install dependencies
cd client
npm install
  1. Request Firebase credentials from team lead

  2. Create .env file with provided credentials

  3. Start development server

npm run dev

Authentication Setup

Required Dependencies

npm install firebase @types/firebase react-router-dom

Environment Configuration

Create .env file in client directory:

VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_domain
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
VITE_FIREBASE_MEASUREMENT_ID=your_measurement_id

Available Auth Features

  • Email/Password Authentication
  • Protected Routes
  • User Context Access
  • Automatic & Manual Sign Out

Accessing Current User

import { useAuth } from '../hooks/useAuth';

function YourComponent() {
  const { user } = useAuth();
  // Access user.uid for database operations
}

Testing Authentication

  1. Start the development server
  2. Navigate to /signin
  3. Create a test account using /signup
  4. Verify protected routes at /dashboard
  5. Test logout functionality