PHPackages                             stauth/symfony-stauth - 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. stauth/symfony-stauth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

stauth/symfony-stauth
=====================

Staging server athorization package, .htaccess alternative

0.0.2(8y ago)19MITPHP

Since Jul 8Pushed 8y ago1 watchersCompare

[ Source](https://github.com/stauth/symfony-stauth)[ Packagist](https://packagist.org/packages/stauth/symfony-stauth)[ RSS](/packages/stauth-symfony-stauth/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Symfony Stauth
==============

[](#symfony-stauth)

[![Latest Stable Version](https://camo.githubusercontent.com/907741265d5a479121866e0ae926028bdcb0d0f99d1b56023c7a9a476c602c2a/68747470733a2f2f706f7365722e707567782e6f72672f7374617574682f73796d666f6e792d7374617574682f76657273696f6e)](https://packagist.org/packages/stauth/symfony-stauth)[![License](https://camo.githubusercontent.com/9cafcabdf180b1235708c8bcd52de0ca2147a112b98c880795e6a0864eaff3c8/68747470733a2f2f706f7365722e707567782e6f72672f7374617574682f73796d666f6e792d7374617574682f6c6963656e7365)](https://packagist.org/packages/stauth/symfony-stauth)[![composer.lock available](https://camo.githubusercontent.com/272b51fcc2c74f46aa3ea03178043284f175e486dd5fb54cd644129570703f71/68747470733a2f2f706f7365722e707567782e6f72672f7374617574682f73796d666f6e792d7374617574682f636f6d706f7365726c6f636b)](https://packagist.org/packages/stauth/symfony-stauth)

Staging server athorization package, alternative for .htaccess, register at [stauth.io](https://www.stauth.io/)

Installation
------------

[](#installation)

```
composer require stauth/symfony-stauth
```

### Local and staging

[](#local-and-staging)

If you don't want Stauth service provider to be exeuted at production environment, import routes in `app/routing_dev.yml`

```
# stauth protection
stauth_protection:
    resource: "@StauthProtectionBundle/Resources/config/routing.yml"
```

Initialize Bundle in `AppKernel.php`:

```
        if ($this->getEnvironment() !== 'prod') {
            // ...
            $bundles[] = new Stauth\StauthProtectionBundle();
        }
```

### Production

[](#production)

If you don't mind Stauth service provider being executed at production environment, or you want to protect your production app, import routes in `app/routing.yml`

```
# stauth protection
stauth_protection:
    resource: "@StauthProtectionBundle/Resources/config/routing.yml"
```

Initialize Bundle in `AppKernel.php`:

```
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Stauth\StauthProtectionBundle(),
        );

```

Generate access token at [stauth.io](https://www.stauth.io) and add it to `parameteres.yml`:

```
stauth.access_token: 'eyJkkk40eXAiOiJsdvk3k43krKV1QiLCJ...'
```

By default protected environment is `staging`, in order to change this, add `stauth.protected_env` to `parameters.yml`:

```
stauth.protected_env: 'local'
```

### Cache

[](#cache)

Please keep in mind that this package takes adventage of `csrf_token`, therefore it is important to exclude both routes `/stauth/protected` and `/stauth/authorize` from any response caching engines.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Total

2

Last Release

3233d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4cd8b978cd18bf6adafd1074f0b45c88ea36acd94ba0452e2e19b06ecbe7906a?d=identicon)[lchachurski](/maintainers/lchachurski)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[simplesamlphp/simplesamlphp-module-oidc

A SimpleSAMLphp module adding support for the OpenID Connect protocol

5016.9k1](/packages/simplesamlphp-simplesamlphp-module-oidc)[concrete5/core

Concrete core subtree split

19159.3k48](/packages/concrete5-core)

PHPackages © 2026

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