PHPackages                             vraith/symfony-auth-starter - 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. vraith/symfony-auth-starter

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

vraith/symfony-auth-starter
===========================

The Laravel Breeze of Symfony — scaffold complete authentication in minutes

v0.1.0(3mo ago)15MITPHPPHP &gt;=8.1

Since Mar 13Pushed 3mo agoCompare

[ Source](https://github.com/Jackmaa/symfony-auth-starter)[ Packagist](https://packagist.org/packages/vraith/symfony-auth-starter)[ RSS](/packages/vraith-symfony-auth-starter/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (16)Versions (2)Used By (0)

Symfony Auth Starter
====================

[](#symfony-auth-starter)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)[![Symfony](https://camo.githubusercontent.com/c786cdaaca91e8091119a6ab20ef404c7fe26ba50aa7c47066c23494c98ce59d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d362e34253230253743253230372e782d626c61636b2e737667)](https://symfony.com)[![PHP](https://camo.githubusercontent.com/c0761d101b201f2531c8037e6264420e2e43705d3776a9fcfb70c8cf3d3563a3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312532422d3737374242342e737667)](https://php.net)

**The Laravel Breeze of Symfony** — scaffold complete authentication into your app in one command.

One `composer require`, one `php bin/console auth:install`, and you have a fully working auth system. After install, you own all the code — no runtime dependency on this package.

Quick Start
-----------

[](#quick-start)

```
composer require vraith/symfony-auth-starter

php bin/console auth:install

# Follow the interactive prompts, then:
php bin/console make:migration
php bin/console doctrine:migrations:migrate
```

The installer will ask whether to enable Google OAuth and prompt for your sender email address. It generates all files directly into your project.

What Gets Generated
-------------------

[](#what-gets-generated)

```
src/
  Entity/User.php                           # Doctrine entity with email, password, googleId, isVerified
  Controller/Auth/
    LoginController.php                     # Login + logout
    RegistrationController.php              # Register + email verification
    ResetPasswordController.php             # Forgot password + reset
    GoogleController.php                    # Google OAuth (optional)
  Form/
    RegistrationFormType.php                # Email + password fields
    ResetPasswordRequestFormType.php        # Email field
    ChangePasswordFormType.php              # Repeated password field
  Security/
    LoginFormAuthenticator.php              # Form login with CSRF + remember me
    GoogleAuthenticator.php                 # OAuth2 authenticator (optional)
templates/auth/
    login.html.twig                         # Login page
    register.html.twig                      # Registration page
    forgot_password.html.twig               # Request password reset
    check_email.html.twig                   # "Check your email" confirmation
    reset_password.html.twig                # New password form
    email/verification.html.twig            # Verification email
    email/reset_password.html.twig          # Password reset email
config/packages/
    security.yaml                           # Full firewall + access control config
    knpu_oauth2_client.yaml                 # Google OAuth client (optional)

```

Routes
------

[](#routes)

MethodPathNameGET`/login``app_login`GET`/logout``app_logout`GET|POST`/register``app_register`GET`/verify/email``app_verify_email`GET|POST`/reset-password``app_forgot_password_request`GET`/reset-password/check-email``app_check_email`GET|POST`/reset-password/reset/{token}``app_reset_password`GET`/connect/google``connect_google_start` \*GET`/connect/google/check``connect_google_check` \*\* Only when Google OAuth is enabled.

What Each Component Does
------------------------

[](#what-each-component-does)

**LoginFormAuthenticator** creates a Symfony Security `Passport` with `UserBadge`, `PasswordCredentials`, `CsrfTokenBadge`, and `RememberMeBadge`. It uses `TargetPathTrait` to redirect users back to where they were before login.

**GoogleAuthenticator** extends KnpU's `OAuth2Authenticator`. It fetches the Google user profile, finds or creates a local `User`, and automatically links Google accounts to existing users with matching email addresses. OAuth users are auto-verified.

**ResetPasswordController** uses SymfonyCasts' ResetPasswordBundle with an anti-enumeration pattern — it always redirects to the "check your email" page even when no user is found, preventing attackers from probing which emails have accounts.

**RegistrationController** hashes the password, persists the user, generates a signed email verification URL, and auto-logs in the user via `UserAuthenticatorInterface`.

Customization
-------------

[](#customization)

All generated code lives in your `src/` and `templates/` directories. Edit it directly — there are no bundle overrides, no config layers, no abstractions to learn.

**Want to add a username field?** Add it to `User.php` and `RegistrationFormType.php`. **Want to change the email template?** Edit `templates/auth/email/verification.html.twig`. **Want to redirect somewhere else after login?** Change the route in `LoginFormAuthenticator::onAuthenticationSuccess()`.

Google OAuth Setup
------------------

[](#google-oauth-setup)

If you enabled Google OAuth during install:

1. Go to [Google Cloud Console](https://console.cloud.google.com/)
2. Create a project and enable the Google+ API
3. Create OAuth 2.0 credentials
4. Add authorized redirect URI: `https://yourdomain.com/connect/google/check`
5. Set the credentials in `.env.local`:

```
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-client-secret
```

If you didn't install Google OAuth initially, run `auth:install` again with `--force`.

To add Google OAuth to an existing install, first require the packages:

```
composer require knpuniversity/oauth2-client-bundle league/oauth2-google
php bin/console auth:install --force
```

Prerequisites
-------------

[](#prerequisites)

All dependencies are pulled in automatically via `composer require`, including:

- `symfony/security-bundle`
- `symfony/twig-bundle`
- `symfony/form`
- `symfony/validator`
- `symfony/mailer`
- `doctrine/doctrine-bundle` + `doctrine/orm`
- `symfonycasts/verify-email-bundle`
- `symfonycasts/reset-password-bundle`

The installer also checks at runtime that the required bundles are registered.

Re-running the Installer
------------------------

[](#re-running-the-installer)

Running `auth:install` a second time will skip files that already exist. Use `--force` to overwrite:

```
php bin/console auth:install --force
```

Removing the Package
--------------------

[](#removing-the-package)

After installation, all auth code lives in your project. You can safely remove the package:

```
composer remove vraith/symfony-auth-starter
```

Your auth system will continue to work since it has zero runtime dependency on the bundle.

Roadmap
-------

[](#roadmap)

- Multi-provider OAuth (GitHub, Facebook, LinkedIn)
- Two-Factor Authentication (2FA)
- Rate limiting on login/registration
- Account management (change email, change password)

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance81

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

103d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/be04260fd723b1d6b1a58080db4f1b4ed25f5693095e4e8fd125f1cb94ecbf5c?d=identicon)[Jackmaa](/maintainers/Jackmaa)

---

Top Contributors

[![Jackmaa](https://avatars.githubusercontent.com/u/12645794?v=4)](https://github.com/Jackmaa "Jackmaa (23 commits)")

---

Tags

symfonygooglescaffoldingsecurityAuthenticationoauth2loginstarter-kit

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vraith-symfony-auth-starter/health.svg)

```
[![Health](https://phpackages.com/badges/vraith-symfony-auth-starter/health.svg)](https://phpackages.com/packages/vraith-symfony-auth-starter)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M373](/packages/easycorp-easyadmin-bundle)[sulu/sulu

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

1.3k1.4M196](/packages/sulu-sulu)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1155.2k](/packages/rcsofttech-audit-trail-bundle)[kimai/kimai

Kimai - Time Tracking

4.7k8.7k1](/packages/kimai-kimai)[sylius/sylius

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

8.5k5.8M712](/packages/sylius-sylius)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)

PHPackages © 2026

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