Files
Daniel Hiller 2e4904f77d feat: Add two-factor authentication via TOTP
Adds TOTP setup with QR code, login challenge, recovery codes and
trusted devices that let a browser skip the second factor for 30
days. Admins can reset another user's second factor by confirming
with their own password.
2026-08-07 20:11:55 +02:00

22 lines
503 B
JavaScript

const AccessTokenSteps = {
ACCEPT_TERMS: 'accept-terms',
VERIFY_TOTP: 'verify-totp',
};
const POSITION_GAP = 65536;
const MAX_SIZE_TO_GET_ENCODING = 8 * 1024 * 1024;
const MAX_SIZE_TO_PROCESS_AS_IMAGE = 64 * 1024 * 1024;
const TRUST_DEVICE_COOKIE_NAME = 'planka-trust-token';
const TRUST_DEVICE_EXPIRES_IN_DAYS = 30;
module.exports = {
AccessTokenSteps,
POSITION_GAP,
MAX_SIZE_TO_GET_ENCODING,
MAX_SIZE_TO_PROCESS_AS_IMAGE,
TRUST_DEVICE_COOKIE_NAME,
TRUST_DEVICE_EXPIRES_IN_DAYS,
};