logicloom-nextjs-starter
Version:
A production-ready Next.js starter template with authentication, i18n, dark mode, and modern patterns
26 lines (22 loc) • 565 B
text/typescript
export const API_ENDPOINTS = {
AUTH: {
LOGIN: "/auth/login",
REGISTER: "/auth/register",
LOGOUT: "/auth/logout",
ME: "/auth/me",
REFRESH: "/auth/refresh",
},
} as const;
export const TOKEN_EXPIRY = {
AUTH_TOKEN: 7 * 24 * 60 * 60 * 1000, // 7 days
REFRESH_TOKEN: 30 * 24 * 60 * 60 * 1000, // 30 days
} as const;
export const STORAGE_KEYS = {
AUTH_TOKEN: "auth_token",
REFRESH_TOKEN: "refresh_token",
USER: "user",
} as const;
export const QUERY_KEYS = {
USER: ["user"],
USERS: ["users"],
} as const;