PHPackages                             survos/auth-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. survos/auth-bundle

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

survos/auth-bundle
==================

Helper commands and classes for symfony security

2.10.19(2w ago)15.2k↑163.2%3MITPHPPHP ^8.5

Since Sep 19Pushed 2w ago2 watchersCompare

[ Source](https://github.com/survos/auth-bundle)[ Packagist](https://packagist.org/packages/survos/auth-bundle)[ GitHub Sponsors](https://github.com/kbond)[ RSS](/packages/survos-auth-bundle/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (165)Versions (1007)Used By (3)

Survos Auth Bundle
==================

[](#survos-auth-bundle)

Symfony bundle for OAuth login and provider-driven onboarding UX.

```
composer req survos/auth-bundle
```

Configuration Model
-------------------

[](#configuration-model)

Use `survos_auth` as the canonical config. The bundle prepends `knpu_oauth2_client` client config automatically.

### 1) Configure providers

[](#1-configure-providers)

`config/packages/survos_auth.yaml`:

```
survos_auth:
    production_url_base: '%env(PRODUCTION_URL)%'
    providers:
        github:
            client_id: '%env(OAUTH_GITHUB_CLIENT_ID)%'
            client_secret: '%env(OAUTH_GITHUB_CLIENT_SECRET)%'
            scopes: ['user:email', 'read:user']
        google:
            client_id: '%env(OAUTH_GOOGLE_CLIENT_ID)%'
            client_secret: '%env(OAUTH_GOOGLE_CLIENT_SECRET)%'
            scopes: ['email', 'profile', 'openid']
```

Optional per-provider keys supported:

- `type`
- `redirect_route`
- `redirect_params`
- `use_state`

Global optional key:

- `production_url_base` (used by provider setup pages to render production callback URLs)

`scopes` are used by your app at redirect time and are not forwarded into KnpU config.

### 2) Add env vars

[](#2-add-env-vars)

```
OAUTH_GITHUB_CLIENT_ID=
OAUTH_GITHUB_CLIENT_SECRET=
OAUTH_GOOGLE_CLIENT_ID=
OAUTH_GOOGLE_CLIENT_SECRET=
```

### 3) Keep knpu config minimal

[](#3-keep-knpu-config-minimal)

`config/packages/knpu_oauth2_client.yaml`:

```
knpu_oauth2_client:
    clients: { }
```

User Entity
-----------

[](#user-entity)

Implement `OAuthIdentifiersInterface` and use `OAuthIdentifiersTrait`.

```
use Survos\AuthBundle\Traits\OAuthIdentifiersInterface;
use Survos\AuthBundle\Traits\OAuthIdentifiersTrait;

class User implements OAuthIdentifiersInterface
{
    use OAuthIdentifiersTrait;
}
```

Useful Routes
-------------

[](#useful-routes)

- `/oauth/connect/{provider}`
- `/oauth/check/{provider}`
- `/oauth/providers`
- `/oauth/provider/{providerKey}`

UI
--

[](#ui)

Twig components are available and should be rendered with `twig:` tags.

```

```

###  Health Score

60

—

FairBetter than 98% of packages

Maintenance97

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 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 ~1 days

Total

1006

Last Release

15d ago

Major Versions

1.6.9 → 2.0.182025-09-28

PHP version history (4 changes)1.2.6PHP ^8.1

1.5.410PHP ^8.3

2.0.18PHP ^8.4

2.8.0PHP ^8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/21b39551f92ed4143772c622f9e571589c5a72c96ab3c53fe67489ce0d83e806?d=identicon)[tacman1123](/maintainers/tacman1123)

---

Top Contributors

[![tacman](https://avatars.githubusercontent.com/u/619585?v=4)](https://github.com/tacman "tacman (19 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/survos-auth-bundle/health.svg)

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[sylius/sylius

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

8.5k5.9M742](/packages/sylius-sylius)[prestashop/prestashop

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

9.1k17.9k](/packages/prestashop-prestashop)[open-dxp/opendxp

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

9421.6k62](/packages/open-dxp-opendxp)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)[contao/core-bundle

Contao Open Source CMS

1231.6M2.8k](/packages/contao-core-bundle)

PHPackages © 2026

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