Download the PHP package betterauth/symfony-bundle without Composer
On this page you can find all versions of the php package betterauth/symfony-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download betterauth/symfony-bundle
More information about betterauth/symfony-bundle
Files in betterauth/symfony-bundle
Package symfony-bundle
Short Description Symfony-native PASETO authentication bundle with application-owned users and persistence
License MIT
Homepage https://github.com/betterauth/betterauth-symfony
Informations about the package symfony-bundle
BetterAuth Symfony
BetterAuth Symfony is Symfony authentication infrastructure for encrypted PASETO v4.local access tokens, atomic refresh-token rotation, encrypted TOTP, and application-owned security ports. It gives an application safe primitives; it does not generate a User entity, routes, controllers, firewalls, Doctrine mappings, migrations, or persistence adapters.
Install and issue a token
The refresh store is an application service implementing
RefreshTokenStoreInterface; it receives SHA-256 hashes, never a raw refresh
token. Issue the pair from an application-owned login route:
Protect a firewall
Your application supplies the user provider and decides which routes require a token. The bundle factory injects that configured provider into the authenticator.
The application remains the owner of persistence, authorization rules, HTTP schemas and error policy. The bundle translates malformed, expired, or non-access PASETOs into Symfony authentication failures.
Capabilities
| Capability | Bundle responsibility | Application responsibility |
|---|---|---|
| PASETO access tokens | Create and parse bounded v4.local claims | User provider, firewall and routes |
| Refresh tokens | Issue, typed atomic rotate, targeted/family revoke | Transactional hash-only store |
| TOTP | Domain-separated seed encryption and verification | Ciphertext-only store and enrollment policy |
| Magic link, reset, guest | One-time hash issuance and atomic consume | Delivery, account policy and storage |
| Device and monitoring | Fingerprint/event services | Retention, alerting and storage |
| Multi-tenant | Membership query service | Membership source and authorization |
Optional features are disabled by default and register no HTTP routes. Enable a feature only after wiring its application-owned port; see the configuration reference for each port.
Compatibility and security
- PHP 8.4+; Symfony 6.4, 7.x and 8.x are supported by the package matrix.
- OpenSSL is required for authenticated TOTP seed encryption.
- Use a high-entropy
BETTER_AUTH_SECRET, rotate it through your own secret lifecycle, and keep access tokens short lived. - Perform refresh rotation and one-time consumption with a conditional, unspent/unexpired database update. Treat a replay as a family-revocation event.
- Make bearer API firewalls stateless. Re-authenticate before changing a second factor or password; revoke refresh families after password reset.
Documentation and migration
- English documentation
- Documentation française
- Configuration reference
- Standalone demo
- Upgrade to 1.1
The demo is outside CI and shows Doctrine/SQLite adapters, stateless bearer authentication, Mailpit delivery, Tailwind built with Bun, and the full route matrix. It is a teaching application: adapt its limits, mail sender, secrets, retention and storage transactions before production use.
All versions of symfony-bundle with dependencies
php Version ^8.4
paragonie/paseto Version ^3.1
psr/cache Version ^3.0
psr/event-dispatcher Version ^1.0
psr/log Version ^3.0
ramsey/uuid Version ^4.7
symfony/config Version ^6.4|^7.0|^8.0
symfony/dependency-injection Version ^6.4|^7.0|^8.0
symfony/event-dispatcher Version ^6.4|^7.0|^8.0
symfony/framework-bundle Version ^6.4|^7.0|^8.0
symfony/http-foundation Version ^6.4|^7.0|^8.0
symfony/http-kernel Version ^6.4|^7.0|^8.0
symfony/security-bundle Version ^6.4|^7.0|^8.0
symfony/yaml Version ^6.4|^7.0|^8.0