26 lines
834 B
TypeScript
26 lines
834 B
TypeScript
/**
|
|
* API Configuration for de Aa Archiefassistent
|
|
*/
|
|
|
|
// API base URL - uses environment variable or falls back to production
|
|
// Using path-based routing: archief.support/auth/* proxies to auth backend
|
|
export const API_BASE_URL = import.meta.env.VITE_API_URL || 'https://archief.support'
|
|
|
|
// Auth endpoints
|
|
export const AUTH_ENDPOINTS = {
|
|
login: `${API_BASE_URL}/auth/login`,
|
|
logout: `${API_BASE_URL}/auth/logout`,
|
|
refresh: `${API_BASE_URL}/auth/refresh`,
|
|
me: `${API_BASE_URL}/auth/me`,
|
|
changePassword: `${API_BASE_URL}/auth/change-password`,
|
|
} as const
|
|
|
|
// Storage keys
|
|
export const STORAGE_KEYS = {
|
|
accessToken: 'de-aa-access-token',
|
|
refreshToken: 'de-aa-refresh-token',
|
|
user: 'de-aa-user',
|
|
} as const
|
|
|
|
// Token expiry buffer (refresh 5 minutes before expiry)
|
|
export const TOKEN_REFRESH_BUFFER_MS = 5 * 60 * 1000
|