Repository navigation
Release v1.23.0
Release v1.23.0
Changelog
Added
- Admin provisioning CLI —
nowo:auth-kit:create-admin <identifier> [--auth-profile=NAME](not--profile, which Symfony reserves for the console profiler) creates a user for an AuthKit profile with the roles fromcreate_admin.roles(default[ROLE_ADMIN]). The password is always read twice from a hidden prompt (no option/argument, no visible fallback, refuses non-interactive runs), must reachcreate_admin.min_password_length(default12) and, when the profile enablespassword_strengthandnowo-tech/password-strength-bundleis installed, pass the same strength policy as the registration form. Duplicate identifiers are rejected. Bypassesregistration_modeon purpose. Backed by theAdminUserCreatorservice; dispatchesNowo\AuthKitBundle\Admin\AdminUserCreatingEvent(before persist — fill host-specific fields) andAdminUserCreatedEvent(after flush — e.g. mark an install wizard as completed). - Recipient-locale notifications — password-reset, magic-login and new-device notifications are prepared in the recipient account's preferred locale: the user entity implements
Nowo\AuthKitBundle\Locale\PreferredLocaleAwareInterface(orrecipient_locale.resolvernames aRecipientLocaleResolverInterfaceservice); when the locale is listed inlocale.enabled, AuthKit generates the reset / magic link with that{_locale}, exposes it asrecipientLocaleonPasswordResetNotificationContext,MagicLoginNotificationContextandNewDeviceLoginNotificationContext, and calls the notifier (and dispatchesPasswordResetRequestedEvent/MagicLoginRequestedEvent) inside Symfony'sLocaleSwitcher::runWithLocale()so$translator->trans()without an explicit locale uses it; the request locale is restored afterwards (worker-safe).recipient_locale.enableddefaults totrueand is a no-op for users without a preference. flash_transTwig filter (flash.twig_filter, default on) — translates a flash key with the first domain offlash.twig_filter_domains(default[messages, NowoAuthKitBundle]) whose catalogue has it; unknown text and structured flashes pass through.AuthKitUrlGenerator::generate()/AuthKitRouteLocaleParameters::merge()accept an optional explicit$locale.
Changed
- Flash messages are stored translated (
flash.translate, defaulttrue): AuthKit controllers translate their flash keys (magic_login.request.flash_sent,reset.*.flash_*,register.flash_rate_limited,social.error.*, …) from theNowoAuthKitBundledomain in the request locale before adding them, so host templates that print{{ message }}or{{ message|trans }}(and UiKitBundle's toast partial) show text instead of raw keys. Setflash.translate: falseto keep raw keys.
Full Changelog: v1.22.4...v1.23.0