Voyti

Voyti

User management, authentication & authorization

Configuration

Override Voyti params in your app’s params.php:

use YiiRocks\Voyti\Enum\ProfileVisibility;

return [
    'yiirocks/voyti' => [
        'appName' => 'My Project',
        'passwordPolicy' => [
            'minLength' => 8,
        ],
        'profileVisibility' => ProfileVisibility::PUBLIC,
    ],
];
appName string
'Voyti'
Application name - used as the {app} placeholder in mail subjects and as the TOTP issuer by the optional TOTP method package (yiirocks/voyti-2fa-totp).
homeRoute string
'home'
Route to redirect to after a successful login (password, 2FA, or social) or logout. Must be a route registered by the host app - an unregistered route name throws a LogicException naming the misconfigured option, rather than a bare router exception.
enableRegistration bool
true
Allow new user registration.
enableEmailConfirmation bool
true
Require email confirmation.
allowPasswordRecovery bool
true
Allow password recovery.
allowAdminPasswordRecovery bool
false
Allow admin-initiated password recovery.
allowAccountDelete bool
false
Allow users to delete their account. Gates the Privacy hub's delete-account link/route alongside privacyMenuItems below - GDPR data export and anonymization live in the separate yiirocks/voyti-gdpr package, with their own config.
emailChangeConfirmation EmailChangeConfirmation
EmailChangeConfirmation::NEW
NONE (change immediately), NEW (confirm new address only), or BOTH (confirm both old and new addresses).
rememberLoginLifespan int
2592000
Remember-me cookie lifetime and idle auth timeout in seconds.
tokenConfirmationLifespan int
86400
Confirmation token validity.
tokenRecoveryLifespan int
21600
Recovery token validity.
enableSwitchIdentities bool
true
Allow admin to switch user identities.
mailAdminOnRegister ?string
null
Email notified on new registration.
recaptchaVersion RecaptchaVersion
RecaptchaVersion::V3
RecaptchaVersion::V2 or RecaptchaVersion::V3. Requires the optional yiirocks/recaptcha package installed and configured. Without it, forms silently render and validate without reCAPTCHA.
maxPasswordAge int
0
Max password age in days before a user is forced to set a new one. 0 disables password expiration entirely.
passwordPolicy array
Nested settings to define the password policy. Minimums must be non-negative, and their sum must not exceed maxLength.
minLength int
6
Minimum password length.
maxLength int
72
Maximum password length. Must not be smaller than minLength.
minUppercase int
0
Minimum Unicode uppercase (Lu) characters.
minLowercase int
0
Minimum Unicode lowercase (Ll) characters.
minDigits int
0
Minimum Unicode decimal-digit (Nd) characters.
minSymbols int
0
Minimum characters outside Unicode letters and numbers.
passwordHistoryLimit int
10
Number of previous passwords remembered per user to prevent reuse. Only enforced when maxPasswordAge is greater than 0.
administratorPermissionName string
'voyti-admin'
Permission name granting admin access.
profileVisibility ProfileVisibility
ProfileVisibility::USERS
Profile visibility: OWNER = owner only, ADMIN = owner + admins, USERS = any authenticated user, PUBLIC = public.
enableAuditLog bool
true
Record admin actions (RBAC and user management changes) to the user_audit_log table, viewable at admin/audit-log/.
rememberMeCookieDomain ?string
null
Domain attribute for the remember-me cookie, e.g. '.example.com', letting a login on one subdomain (app.example.com) carry over to others (admin.example.com) that share the same root domain. Leave null to scope the cookie to the exact host it was issued on.
viewPath ?string
null
Optional custom directory for web template overrides. When a template is not found here, falls back to the first installed views package's bundled views, announced via the viewsPackagePaths param (populated by the views package itself).
mailPath string
VoytiConfig::DEFAULT_MAIL_PATH
Base path for mail templates. If a template is not found here, falls back to the default mail templates.
enableRecommendations bool
true
Show recommended sibling Voyti packages (REST API, GDPR, social authentication, two-factor auth) in the admin dashboard when they are not already installed. Set to false to disable package recommendations entirely.