export const AUTH_PROVIDERS = Object.freeze({
  LOCAL: 'local',
  GOOGLE: 'google',
});

export const BCRYPT_SALT_ROUNDS = 12;
export const JWT_EXPIRES_IN = '15m';
export const JWT_EXPIRES_IN_MS = 15 * 60 * 1000;
export const AUTH_COOKIE_NAME = 'school_chain_session';
export const AUTH_REFRESH_COOKIE_NAME = 'school_chain_refresh';
export const AUTH_COOKIE_PATH = '/';
export const REFRESH_TOKEN_EXPIRES_IN_MS = 14 * 24 * 60 * 60 * 1000;
export const REFRESH_TOKEN_BYTES = 64;
export const REFRESH_TOKEN_HASH_ALGORITHM = 'sha256';
/** One-time email-verification / password-reset token: random byte length and TTL. */
export const EMAIL_ACTION_TOKEN_BYTES = 20;
export const EMAIL_ACTION_TOKEN_TTL_MS = 360000;
export const AUTH_COOKIE_SAME_SITE_VALUES = Object.freeze([
  'strict',
  'lax',
  'none',
]);
export const DEFAULT_AUTH_COOKIE_SAME_SITE = 'lax';
export const UNSAFE_HTTP_METHODS = Object.freeze([
  'POST',
  'PUT',
  'PATCH',
  'DELETE',
]);
