Modern authentication bundle for Symfony with API/session/hybrid modes, token rotation, OAuth, 2FA, and optional multi-tenant features.
composer require betterauth/symfony-bundle
php bin/console better-auth:install
php bin/console better-auth:setup-features --preset=full --with-controllers --migrate
Then check generated routes:
php bin/console debug:router | grep auth
^8.4^6.4 | ^7.0 | ^8.0^4.0^3.0^4.0Use one of these DATABASE_URL values:
# PostgreSQL
DATABASE_URL=postgresql://app:secret@127.0.0.1:5432/app?serverVersion=16&charset=utf8
# SQLite
DATABASE_URL=sqlite:///%kernel.project_dir%/var/data.db
# MySQL
DATABASE_URL=mysql://app:secret@127.0.0.1:3306/app?serverVersion=8.4&charset=utf8mb4
# MariaDB
DATABASE_URL=mysql://app:secret@127.0.0.1:3306/app?serverVersion=mariadb-11.0.2&charset=utf8mb4
better-auth:installbetter-auth:setup-featuresbetter-auth:add-controllerbetter-auth:user-fieldsbetter-auth:configurebetter-auth:switch-modebetter-auth:generate-configbetter-auth:generate-secretbetter-auth:setup:dependenciesbetter-auth:setup:loggingbetter-auth:config:updatebetter-auth:publish-templatesbetter-auth:cleanup:sessionsbetter-auth:cleanup:tokensStart here:
Most-used guides:
This bundle uses Paseto V4 and supports hardening through configuration, rate limiting strategy, and security monitoring options. For production hardening checklist, see docs/11-SECURITY.md.
MIT. See LICENSE.
How can I help you explore Laravel packages today?