Skip to content

nowo-tech/AuthKitBundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auth Kit Bundle

CI Packagist Version Packagist Downloads License PHP Symfony GitHub stars Coverage

Found this useful? Install from Packagist and give the repo a star on GitHub.

Symfony bundle for configurable login, registration, and password reset: overridable Twig templates, registration modes (disabled, first_user_only, always), optional embeddable auth dropdown, locale-prefixed routes, assignable registration role, configurable user entity and form fields, built-in routes, and translations (de, en, es, fr, it, nl, pt).

Works alongside Symfony Security — security.yaml remains required and is documented in INSTALLATION.md with optional CLI helper nowo:auth-kit:configure-security.

FrankenPHP Friendly Worker Mode

This bundle is FrankenPHP worker mode friendly.

Features

  • Login page compatible with Symfony form_login
  • Registration with Doctrine persistence and password hashing
  • Password reset (link, code, or both) with pluggable notifier
  • Magic login (passwordless email link via Symfony login_link)
  • Embedded auth dropdown (auth_kit_dropdown()) for navbars and layouts
  • Locale in URL paths (/en/login, /es/register, …)
  • Remember me (optional persistent login cookie)
  • Password strength (optional integration with nowo-tech/password-strength-bundle)
  • Registration modes: disabled, first user only, always open
  • Named profiles — separate auth config per user entity (User, Admin, …) with O(1) class resolution
  • Configurable user_class, identifier field, login/register fields, role, routes, templates
  • Twig overrides via templates/bundles/NowoAuthKitBundle/
  • Translation domain NowoAuthKitBundle with app overrides (de, en, es, fr, it, nl, pt)

Installation

composer require nowo-tech/auth-kit-bundle
# config/packages/nowo_auth_kit.yaml
nowo_auth_kit:
    default_profile: default
    profiles:
        default:
            user_class: App\Entity\User
            user_identifier_field: email
            registration_mode: first_user_only
            registration_role: ROLE_USER

The legacy flat layout (user_class at root) remains supported. See Configuration.

php bin/console nowo:auth-kit:configure-security

Development

make up
make test
make release-check

Demo

make -C demo up-symfony8   # Symfony 8.1 — http://localhost:8010

Register the first user, then try password login, password reset, magic login, and dual locale URLs (/en/login and bare /login → redirect). The demo includes Bootstrap 5 UI overrides, embed dropdown, a session delivery inbox (no mailer), and FrankenPHP (Docker).

Screenshots

Welcome page with locale switcher and Account dropdown Full-page login at /en/login Embedded sign-in in navbar dropdown

Welcome · Login · auth_kit_dropdown()

See demo/README.md for template override paths and docs/DEMO-FRANKENPHP.md for FrankenPHP setup (including worker mode for production).

Tests and coverage

  • Tests: PHPUnit (unit + integration)
  • PHP: 100%
  • TS/JS: N/A
  • Python: N/A

License

MIT — see LICENSE.

Documentation

Additional documentation

About

Symfony bundle for configurable login, registration, password reset, and magic login with overridable Twig templates, named profiles, locale routes, and translations.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages