-
-
Notifications
You must be signed in to change notification settings - Fork 565
Login and Registration
Navigate to /login and enter your email and password. On success, the server sets a trek_session cookie — httpOnly, sameSite=lax, and secure in production — that persists your session for 24 hours across page reloads and browser restarts. You do not need to sign in again until the session expires or you explicitly log out.
Note: The
secureflag on the cookie can be overridden by settingCOOKIE_SECURE=falsein the server environment (useful for plain-HTTP dev setups), or force-enabled withFORCE_HTTPS=true.
If your account has two-factor authentication enabled, you are prompted for a TOTP code (or backup code) after the password step before the session cookie is issued.
If you have forgotten your password, click the "Forgot password?" link below the password field to start the self-service reset flow. See Password-Reset for details.
If an admin has marked your account as requiring a password change, a Set new password form is shown immediately after a successful login (or after the MFA step). The session cookie is not issued until the new password is saved.
The Register form appears under one of these conditions:
-
Open registration — the admin has enabled password registration for the instance (
password_registrationsetting). -
Valid invite link — you visited
/login?invite=TOKENwith a valid token (see below). - First user — no accounts exist yet; the registration form is shown automatically and the first account created becomes an admin.
Registration fields: username, email, and password.
Passwords must meet all of the following rules:
- Minimum 8 characters
- At least one uppercase letter
- At least one lowercase letter
- At least one number
- At least one special character
- Must not be a commonly used password
- Must not consist of a single repeated character
Admin: You can disable open registration so only invite links work. See Admin-Users-and-Invites.
When an admin shares an invite link (/login?invite=TOKEN), visiting it:
- Validates the token against the server.
- Switches the login page to Register mode automatically.
- Passes the token during registration so it counts against the invite's use limit.
If the token is invalid, expired, or exhausted, an error is shown.
On a fresh TREK instance with no existing accounts, the registration form opens immediately. The first account created is automatically assigned the admin role.
Failed login attempts are rate-limited to 10 attempts per 15-minute window per IP address. After exceeding the limit, further attempts return HTTP 429 until the window resets.
MFA verification attempts are rate-limited separately to 5 attempts per 15-minute window per IP address.
Forgot-password requests are rate-limited to 3 attempts per 15-minute window per IP. Reset-password submissions are limited to 5 attempts per 15-minute window per IP.
When the server is started with DEMO_MODE=true, a "Try demo" button appears below the login form. Clicking it signs you in as the demo user without entering credentials. The demo credentials (demo@trek.app / demo12345) are also displayed in the app config for reference, but the one-click button is the intended entry point.
If the admin has configured OpenID Connect, a "Sign in with SSO" button (labelled with the configured OIDC_DISPLAY_NAME, defaulting to SSO) appears below the login form. See OIDC-SSO for details on setup and the sign-in flow.
When OIDC-only mode is active (password login disabled), visiting /login automatically redirects the browser to the identity provider. The email/password form is not shown. The automatic redirect is suppressed only when you have explicitly logged out, in which case the SSO button is shown instead so you can choose to sign back in.
See also: OIDC-SSO · Admin-Users-and-Invites · Password-Reset
- Home
- Quick Start
- Install: Docker
- Install: Docker Compose
- Install: Helm
- Install: Proxmox VE (LXC)
- Install: Unraid
- Install: Portainer
- Reverse Proxy
- Environment Variables
- Updating
- Login and Registration
- OIDC SSO
- Two-Factor Authentication
- Password Reset
- User Settings
- Display Settings
- Map Settings
- Notifications
- Offline Mode and PWA
- Languages
- My Trips Dashboard
- Creating a Trip
- Trip Members and Sharing
- Trip Planner Overview
- Places and Search
- Day Plans and Notes
- Map Features
- Route Optimization
- Weather Forecasts
- Reservations and Bookings
- Transport: Flights, Trains, Cars
- Accommodations
- Budget Tracking
- Packing Lists
- Packing Templates
- Todos and Tasks
- Documents and Files
- Tags and Categories
- Real-Time Collaboration
- Collab Chat
- Collab Notes
- Collab Polls
- What's Next Widget
- Public Share Links
- Invite Links