open-index/open-npm huggingface dataset:
npm package: @pikmeup/auth-middleware
Description: Authentication middleware for PikMeUp services
Latest version: 1.2.0

# PikMeUp Auth Middleware

A shared authentication middleware for PikMeUp microservices.

## Installation

```bash
npm install @pikmeup/auth-middleware
```

## Usage

```typescript
import express from 'express';
import { authenticateUser, requireAuth, AuthenticatedRequest } from '@pikmeup/auth-middleware';

const app = express();

// Apply authentication middleware
app.use(authenticateUser);

// Protected route example
app.get('/protected', requireAuth, (req: AuthenticatedRequest, res) => {
  // Access authenticated user data
  const userId = req.user?.uid;
  res.json({ message: 'Protected route', userId });
});
```

## Features

- Firebase Authentication integration
- Token verification
- User information extraction
- TypeScript support
- Express middleware

## Development

```bash
# Install dependencies
npm install

# Run in development mode
npm run dev

# Build
npm run build

# Run tests
npm test
```