User Management¶
Guide for managing user accounts, authentication, and security settings in Bifolk.
Target Audience: System administrators, organization owners
User Registration¶
Self-Registration¶
When ALLOW_SELF_REGISTRATION=True (the default):
- Users register through the signup page at
/register/ - They provide a username, email address, and password
- If
REQUIRE_EMAIL_VERIFICATION=True, they must verify their email before logging in - After verification (or immediately if verification is disabled), they can log in
- A personal organization is automatically created for the new user
- The browser language is detected and saved as the user's language preference
Admin-Created Accounts¶
When ALLOW_SELF_REGISTRATION=False, only administrators can create users:
- Go to the Django admin interface (
/admin/) - Navigate to Users > Add User
- Set username, email, and password
- Save
A profile is automatically created for each new user.
Invitation-Based Registration¶
Organization admins can invite users regardless of the self-registration setting:
- Go to the organization's detail page
- Click Invite Member
- Enter the person's email and select a role
- The person receives an invitation email
- They register (if new) or accept (if existing user)
Invitations expire after 7 days by default.
Note
Invited users can always register, even when self-registration is disabled. The invitation link bypasses the registration restriction.
User Profiles¶
Each user has a profile that is created automatically at registration. The profile includes:
- Profile Picture: Uploaded by the user, automatically resized to 300x300 pixels
- Language: English or German (auto-detected from browser at registration)
- Theme Preference: Light, Dark, or System (default: System)
- Default Report Date Range: Current Year or Last 365 Days (default: Current Year)
- Last Seen Version: Tracks which application version the user last acknowledged (used for changelog notifications)
Users manage their own profile at /profile/.
Managing Users via Django Admin¶
Viewing Users¶
- Go to
/admin/ - Navigate to Authentication and Authorization > Users
- Use search and filters to find users
Viewing Profiles¶
- Go to
/admin/ - Navigate to Users > Profiles
- Profiles can be searched by username or email
- Profiles can be filtered by language
Editing a User¶
- Click on a user in the admin list
- Edit fields:
- Username, email, first name, last name
- Active status (controls login ability)
- Staff status (grants Django admin access)
- Superuser status (grants full access to all features)
- Save
Deactivating a User¶
- Edit the user in Django admin
- Uncheck Active
- Save
Deactivated users cannot log in but their data is preserved. This is the recommended approach instead of deleting user accounts.
Resetting a Password¶
- Edit the user in Django admin
- Click the change password link at the top of the form
- Set a new password
- Communicate the temporary password to the user securely
Authentication Methods¶
Username/Password¶
The default authentication method. Users can log in with either their username or email address. Authentication is handled by django-allauth.
Single Sign-On (OIDC)¶
When configured, users can log in via an external identity provider (e.g., Authentik, Keycloak). See Configuration for OIDC settings.
| Setting | Default | Description |
|---|---|---|
OIDC_CLIENT_ID |
(empty) | Client ID from your identity provider. OIDC is only active when this is set |
OIDC_CLIENT_SECRET |
(empty) | Client secret from your identity provider |
OIDC_SERVER_URL |
(empty) | OpenID Connect server URL |
OIDC_PROVIDER_ID |
authentik |
Internal provider identifier, used in callback URLs |
OIDC_PROVIDER_NAME |
Single Sign-On |
Display name shown on the login page button |
DISABLE_STANDARD_LOGIN |
False |
When True, hides the username/password form and shows only the SSO button |
Two-Factor Authentication (MFA)¶
Bifolk supports TOTP-based two-factor authentication via authenticator apps.
| Setting | Default | Description |
|---|---|---|
MFA_REQUIRED |
none |
MFA enforcement: none (optional), staff (staff users only), or all (all users) |
MFA_GRACE_PERIOD_DAYS |
7 |
Days users have to set up MFA before being locked out |
MFA_TOTP_ISSUER |
Bifolk |
Issuer name shown in authenticator apps |
When MFA is required:
- Users are reminded to set up MFA during the grace period
- After the grace period, users are forced to set up MFA before accessing other pages
- Users cannot delete their last authenticator if MFA is required for them
- 10 recovery codes are generated during setup for emergency access
Organization-level MFA policies can also be configured. If any of a user's organizations require MFA, the user cannot remove their last authenticator.
Registration Settings¶
| Setting | Default | Description |
|---|---|---|
ALLOW_SELF_REGISTRATION |
True |
Allow users to register themselves |
REQUIRE_EMAIL_VERIFICATION |
True |
Require email verification before login |
When email verification is enabled:
- Confirmation emails are valid for 3 days
- Users are automatically logged in after confirming their email
Session Management¶
| Setting | Default | Description |
|---|---|---|
SESSION_TOKEN_LIFETIME_HOURS |
168 (7 days) |
How long users stay logged in |
Common values:
24(1 day) - High security environments168(7 days) - Recommended default336(14 days) - Moderate security720(30 days) - Convenience-focused
Sessions persist beyond browser close. The session cookie is HTTP-only and uses secure cookies in production.
Related Documentation¶
- Organization Management - Managing organizations and memberships
- Permissions & Roles - Role-based access control
- Configuration - Authentication and system settings
- Profile & Settings - User-facing profile documentation