<!-- source-hash: 4c8db2ca2e01162d15b98d0016263763 -->
Core TypeScript definitions for the authentication system, including user roles, SSO providers, and JWT token structure.

## Key Components

**Types & Enums:**
- `UserRole` - Defines user permission levels ('user' | 'super_admin')
- `AuthStatus` - Tracks authentication state ('loading' | 'authenticated' | 'unauthenticated')
- `SSOProvider` - Supported SSO providers ('google' | 'slack' | 'microsoft')

**Interfaces:**
- `AuthUser` - Core user object with profile information and role
- `AuthContextType` - React context interface for authentication state and methods
- `JWTClaims` - JWT token payload structure with standard claims

## Usage Example

```typescript
import { AuthUser, AuthContextType, SSOProvider } from './auth'

// Create authenticated user
const user: AuthUser = {
  id: 'user_123',
  email: 'user@example.com',
  name: 'John Doe',
  avatar_url: 'https://example.com/avatar.jpg',
  role: 'user',
  provider: 'google'
}

// Use in React context
const authContext: AuthContextType = {
  user,
  status: 'authenticated',
  isLoading: false,
  isSuperAdmin: user.role === 'super_admin',
  signInWithSSO: async (provider: SSOProvider) => {
    // SSO sign-in logic
  },
  signOut: async () => {
    // Sign-out logic
  }
}

// Check JWT claims
const isValidToken = (claims: JWTClaims) => {
  return claims.exp > Date.now() / 1000 && claims.user_role === 'super_admin'
}
```