PHPackages                             betterauth/symfony-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. betterauth/symfony-bundle

ActiveSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

betterauth/symfony-bundle
=========================

Symfony bundle for BetterAuth - Modern authentication library

v0.0.18(2mo ago)423↓50%[2 PRs](https://github.com/devaubree/betterauth-symfony/pulls)MITPHPPHP ^8.4CI passing

Since Jan 14Pushed 1mo agoCompare

[ Source](https://github.com/devaubree/betterauth-symfony)[ Packagist](https://packagist.org/packages/betterauth/symfony-bundle)[ Docs](https://github.com/betterauth/betterauth-symfony)[ RSS](/packages/betterauth-symfony-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (80)Versions (18)Used By (0)

BetterAuth for Symfony
======================

[](#betterauth-for-symfony)

[![CI](https://github.com/MakFly/betterauth-symfony/actions/workflows/tests.yml/badge.svg?branch=main&event=push)](https://github.com/MakFly/betterauth-symfony/actions/workflows/tests.yml?query=branch%3Amain)[![Latest Stable Version](https://camo.githubusercontent.com/20acd244616e1706bd37f0d1b172dc41aac620b5bed9c2c15ff989bd63e486e5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626574746572617574682f73796d666f6e792d62756e646c653f6c6162656c3d737461626c65)](https://packagist.org/packages/betterauth/symfony-bundle)[![Total Downloads](https://camo.githubusercontent.com/b27b25e34901f351e11c0a5c2b627f24f9b24fd5c1cafaaa603aabd54716ca8b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626574746572617574682f73796d666f6e792d62756e646c653f6c6162656c3d646f776e6c6f616473)](https://packagist.org/packages/betterauth/symfony-bundle)[![PHP Version](https://camo.githubusercontent.com/77c5d0f41855201c95638139965314a3ab07d91e5c87a2d9ace7ad362a7e470b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f626574746572617574682f73796d666f6e792d62756e646c653f6c6162656c3d706870)](https://packagist.org/packages/betterauth/symfony-bundle)[![License](https://camo.githubusercontent.com/716e275176d92dd94d8b9774fec75b8d4fd3adfbb4648da6430ad6f5742586dc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626574746572617574682f73796d666f6e792d62756e646c653f6c6162656c3d6c6963656e7365)](LICENSE)

Modern authentication bundle for Symfony with API/session/hybrid modes, token rotation, OAuth, 2FA, and optional multi-tenant features.

TL;DR
-----

[](#tldr)

```
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
```

Compatibility
-------------

[](#compatibility)

- PHP: `^8.4`
- Symfony: `^6.4 | ^7.0 | ^8.0`
- API Platform: `^4.0`
- Doctrine ORM: `^3.0`
- Doctrine Migrations Bundle: `^4.0`
- Databases tested in CI:

1. PostgreSQL
2. SQLite
3. MySQL
4. MariaDB

Database URLs
-------------

[](#database-urls)

Use 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
```

Main Console Commands
---------------------

[](#main-console-commands)

- `better-auth:install`
- `better-auth:setup-features`
- `better-auth:add-controller`
- `better-auth:user-fields`
- `better-auth:configure`
- `better-auth:switch-mode`
- `better-auth:generate-config`
- `better-auth:generate-secret`
- `better-auth:setup:dependencies`
- `better-auth:setup:logging`
- `better-auth:config:update`
- `better-auth:publish-templates`
- `better-auth:cleanup:sessions`
- `better-auth:cleanup:tokens`

Documentation
-------------

[](#documentation)

Start here:

- [Documentation Index](docs/00-INDEX.md)
- [Installation](docs/01-INSTALLATION.md)
- [Configuration](docs/02-CONFIGURATION.md)

Most-used guides:

- [API Mode](docs/03-API-MODE.md)
- [Session Mode](docs/04-SESSION-MODE.md)
- [Hybrid Mode](docs/05-HYBRID-MODE.md)
- [OAuth Providers](docs/06-OAUTH-PROVIDERS.md)
- [Two-Factor Auth (TOTP)](docs/07-TWO-FACTOR-AUTH.md)
- [Security Guide](docs/11-SECURITY.md)
- [Testing](docs/12-TESTING.md)
- [Migration Guide](docs/14-MIGRATION.md)
- [Entity Customization](docs/16-ENTITY-CUSTOMIZATION.md)
- [Controllers](docs/18-CONTROLLERS.md)
- [Advanced Customization](docs/19-CUSTOMIZATION.md)

Security Note
-------------

[](#security-note)

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](docs/11-SECURITY.md).

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance88

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

15

Last Release

74d ago

PHP version history (2 changes)v0.0.2PHP ^8.2

v0.0.15PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/36bd784d4a0a99b303da318f09603e9861ed9a0cabc2135103eb9954f2d7362c?d=identicon)[MakFly](/maintainers/MakFly)

---

Top Contributors

[![MakFly](https://avatars.githubusercontent.com/u/6107225?v=4)](https://github.com/MakFly "MakFly (80 commits)")

---

Tags

symfonybundleauthAuthenticationSSOoauthmulti-tenantapi-platformuuid v7organizationsbetterauth

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/betterauth-symfony-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/betterauth-symfony-bundle/health.svg)](https://phpackages.com/packages/betterauth-symfony-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
