PHPackages                             sunxyw/spiral-auth0-bridge - 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. sunxyw/spiral-auth0-bridge

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

sunxyw/spiral-auth0-bridge
==========================

This is my package spiral-auth0-bridge

v0.6.0(2y ago)03MITPHPPHP ^8.1

Since Aug 5Pushed 2y ago1 watchersCompare

[ Source](https://github.com/sunxyw/spiral-auth0-bridge)[ Packagist](https://packagist.org/packages/sunxyw/spiral-auth0-bridge)[ Docs](https://github.com/sunxyw/spiral-auth0-bridge)[ GitHub Sponsors](https://github.com/roadrunner-server)[ RSS](/packages/sunxyw-spiral-auth0-bridge/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (9)Versions (3)Used By (0)

This is my package spiral-auth0-bridge
======================================

[](#this-is-my-package-spiral-auth0-bridge)

[![PHP Version Require](https://camo.githubusercontent.com/370a8fcaa4fc4b2b8040437a7eb226792030ba482e42730fd6a1bc32f6309ecd/68747470733a2f2f706f7365722e707567782e6f72672f73756e7879772f73706972616c2d61757468302d6272696467652f726571756972652f706870)](https://packagist.org/packages/sunxyw/spiral-auth0-bridge)[![Latest Stable Version](https://camo.githubusercontent.com/e68f1cdaa37e733fd82afff337903d1cd7d9105f9fa2b41a8135084a8805d312/68747470733a2f2f706f7365722e707567782e6f72672f73756e7879772f73706972616c2d61757468302d6272696467652f762f737461626c65)](https://packagist.org/packages/sunxyw/spiral-auth0-bridge)[![phpunit](https://github.com/sunxyw/spiral-auth0-bridge/actions/workflows/phpunit.yml/badge.svg)](https://github.com/sunxyw/spiral-auth0-bridge/actions)[![psalm](https://github.com/sunxyw/spiral-auth0-bridge/actions/workflows/psalm.yml/badge.svg)](https://github.com/sunxyw/spiral-auth0-bridge/actions)[![Codecov](https://camo.githubusercontent.com/bf6aee85c3cf9b95e7b3b8e8414c8fdad3781b33aff2c190f479f46061ab89aa/68747470733a2f2f636f6465636f762e696f2f67682f73756e7879772f73706972616c2d61757468302d6272696467652f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/sunxyw/spiral-auth0-bridge/)[![Total Downloads](https://camo.githubusercontent.com/ad29d13e7db3a63ee62510305a1091f24cd5ff396d832ece7c2115bbba1d11f9/68747470733a2f2f706f7365722e707567782e6f72672f73756e7879772f73706972616c2d61757468302d6272696467652f646f776e6c6f616473)](https://packagist.org/sunxyw/spiral-auth0-bridge/phpunit)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Requirements
------------

[](#requirements)

Make sure that your server is configured with following PHP version and extensions:

- PHP 8.1+
- Spiral framework 3.0+

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

[](#installation)

You can install the package via composer:

```
composer require sunxyw/spiral-auth0-bridge
```

After package install you need to register bootloader from the package.

```
protected const LOAD = [
    // ...
    \Sunxyw\SpiralAuth0Bridge\Bootloader\Auth0BridgeBootloader::class,
];
```

> Note: if you are using [`spiral-packages/discoverer`](https://github.com/spiral-packages/discoverer), you don't need to register bootloader by yourself.

Usage
-----

[](#usage)

Register the `\Sunxyw\SpiralAuth0Bridge\Security\Auth0TokenStorage` token storage via config or bootloader, you may find documentation [here](https://spiral.dev/docs/security-authentication/current/en#custom-token-storage).

Then, register the actor provider `\Sunxyw\SpiralAuth0Bridge\Security\Auth0ActorProvider` via bootloader too, documentation may find [here](https://spiral.dev/docs/security-authentication/current/en#actor-provider-and-token-payload).

> You may want to scroll down the documentation page to find the registration steps.

Please remember to configure your AuthTransportMiddleware too, otherwise, Auth0 bridge will not able to retrieve the token. [Docs](https://spiral.dev/docs/security-authentication/current/en#usage-with-http-layer).

After that, you can obtain the actor using `AuthContextInterface`.

```
public function index(\Spiral\Auth\AuthContextInterface $auth)
{
    if ($auth->getActor() === null) {
        throw new ForbiddenException();
    }

    dump($auth->getActor());
}
```

The actor will be an instance of `\Sunxyw\SpiralAuth0Bridge\Security\Auth0Actor`.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Sunxyw](https://github.com/sunxyw)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

1064d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0074b4d8ef244d2d516e67fe7949e287b37eeee02d4adfa0da953077bf7e0121?d=identicon)[sunxyw](/maintainers/sunxyw)

---

Top Contributors

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

---

Tags

spiralsunxywspiral-auth0-bridge

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sunxyw-spiral-auth0-bridge/health.svg)

```
[![Health](https://phpackages.com/badges/sunxyw-spiral-auth0-bridge/health.svg)](https://phpackages.com/packages/sunxyw-spiral-auth0-bridge)
```

###  Alternatives

[auth0/symfony

Symfony SDK for Auth0 Authentication and Management APIs.

128814.6k](/packages/auth0-symfony)[auth0/login

Auth0 Laravel SDK. Straight-forward and tested methods for implementing authentication, and accessing Auth0's Management API endpoints.

2795.3M3](/packages/auth0-login)[auth0/wordpress

WordPress Plugin for Auth0

18123.8k](/packages/auth0-wordpress)

PHPackages © 2026

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