-
Notifications
You must be signed in to change notification settings - Fork 36
Settings and Security
Monize provides comprehensive security features and configurable user preferences.
- User Settings
- Two-Factor Authentication (2FA)
- Trusted Devices
- Password Management
- Single Sign-On (OIDC)
- Security Architecture
- Admin Features
Navigate to Settings (gear icon in the top-right corner) to configure your preferences.

| Setting | Description |
|---|---|
| Home Currency | Primary currency for reporting and dashboard totals |
| Date Format | How dates are displayed throughout the application |
| Number Format | Decimal and thousands separator preferences |
| Theme | Light or dark mode |
| Email Notifications | Toggle email notifications for bills and reminders |
Monize supports Time-based One-Time Password (TOTP) authentication for an additional layer of security.
- Navigate to Settings
- Click Enable Two-Factor Authentication
- Scan the QR code with your authenticator app (Google Authenticator, Authy, 1Password, etc.)
- Enter the 6-digit verification code to confirm setup
- Save your backup codes in a secure location

After enabling 2FA:
- Enter your email and password as normal
- You will be prompted for a 6-digit TOTP code
- Enter the code from your authenticator app
- Optionally check "Trust this device" to skip 2FA on this device for future logins
- Navigate to Settings
- Click Disable Two-Factor Authentication
- Enter your current TOTP code to confirm
When logging in with 2FA, you can mark a device as "trusted" to skip the TOTP prompt on future logins from that device.
- Navigate to Settings
- Scroll to the Trusted Devices section
- View all currently trusted devices
- Click Remove to revoke trust for any device

Security Note: Trusted device tokens are stored as SHA-256 hashes in the database. The actual token is stored only in the browser cookie.
- Navigate to Settings or Change Password
- Enter your current password
- Enter and confirm your new password
- Click Save
Password changes immediately revoke all existing refresh tokens, logging you out of all other sessions.
- On the login page, click Forgot Password
- Enter your email address
- Check your email for a reset link
- Click the link and set a new password
Security Note: Password reset tokens are hashed with SHA-256 before being stored in the database. The token expires after a set time period.
Monize supports OpenID Connect (OIDC) for single sign-on integration with identity providers.
- Authentik
- Authelia
- Pocket-ID
- Any OpenID Connect-compatible provider
OIDC is configured via environment variables:
OIDC_ISSUER=https://your-identity-provider.com
OIDC_CLIENT_ID=monize
OIDC_CLIENT_SECRET=your-client-secret
OIDC_REDIRECT_URI=http://localhost:3001/auth/callbackWhen OIDC is configured, a "Sign in with SSO" button appears on the login page.

Monize implements comprehensive security measures:
| Feature | Implementation |
|---|---|
| Password Hashing | bcrypt with salt rounds |
| Access Tokens | JWT with 15-minute expiry |
| Refresh Tokens | 7-day rotating tokens with family-based replay detection |
| TOTP Encryption | Per-user unique salt (not shared secret) |
| Rate Limiting | 100 req/min global, 3-5 per 15 min on auth endpoints |
| Feature | Implementation |
|---|---|
| User Isolation | All database queries filter by userId |
| Input Validation | DTO validation with whitelist mode (rejects unknown fields) |
| SQL Injection | Parameterized queries via TypeORM |
| XSS Protection | No dangerouslySetInnerHTML, HTML escaping in emails |
| CSRF | Token validation with httpOnly cookies |
| Header | Value |
|---|---|
| Content-Security-Policy | Restrictive CSP with style-src and script-src whitelist |
| Strict-Transport-Security | max-age=31536000; includeSubDomains |
| X-Content-Type-Options | nosniff |
| X-Frame-Options | DENY |
| Referrer-Policy | strict-origin-when-cross-origin |
| Cross-Origin-Opener-Policy | same-origin |
| Cross-Origin-Resource-Policy | same-origin |
| Permissions-Policy | Restrictive policy |
Users with the admin role have access to additional features.
Navigate to Admin > User Management to manage application users.

Admin capabilities:
- View all registered users
- Change user roles (user/admin)
- Disable or enable user accounts
- Reset user passwords
Note: The admin section only appears in the navigation if your user account has the admin role.