PHPackages                             fahmiardi/oauth2-server-redis - 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. fahmiardi/oauth2-server-redis

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

fahmiardi/oauth2-server-redis
=============================

Redis storage adapter for the League's PHP OAuth 2.0 server.

239PHP

Since May 10Pushed 11y ago1 watchersCompare

[ Source](https://github.com/fahmiardi/oauth2-server-redis)[ Packagist](https://packagist.org/packages/fahmiardi/oauth2-server-redis)[ RSS](/packages/fahmiardi-oauth2-server-redis/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

Redis Storage Adapter
=====================

[](#redis-storage-adapter)

This is a Redis storage adapter for the [League's PHP OAuth 2.0 server](https://github.com/thephpleague/oauth2-server) which is maintained by Alex Bilbie.

[![Build Status](https://camo.githubusercontent.com/d63a42b59d8d9092fbf422ccd02537022c203bef45fd6a5244001398c631a26d/68747470733a2f2f7472617669732d63692e6f72672f6a61736f6e6c657769732f6f61757468322d7365727665722d72656469732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jasonlewis/oauth2-server-redis)

Foreword
--------

[](#foreword)

This adapter is for the fourth version of the OAuth 2.0 server and as such is prone to breakages as the server itself is being developed.

Usage
-----

[](#usage)

This storage adapter uses [Predis](https://github.com/nrk/predis) as an interface to Redis. Make sure you have Redis installed on your machine to use this adapter.

To begin you must new up and instance of the Predis client.

```
$redis = new Predis\Client;
```

Once you have an instance of `League\OAuth2\Server\AuthorizationServer` you can set the different storages.

```
$server->setClientStorage(new Lewis\OAuth2\Server\Storage\RedisClient($redis));
$server->setSessionStorage(new Lewis\OAuth2\Server\Storage\RedisSession($redis));
$server->setAccessTokenStorage(new Lewis\OAuth2\Server\Storage\RedisAccessToken($redis));
$server->setRefreshTokenStorage(new Lewis\OAuth2\Server\Storage\RedisRefreshTokenStorage($redis));
$server->setAuthCodeStorage(new Lewis\OAuth2\Server\Storage\RedisAuthCode($redis));
$server->setScopeStorage(new Lewis\OAuth2\Server\Storage\RedisScope($redis));
```

License
-------

[](#license)

This package is licensed under the [BSD 2-Clause license](http://opensource.org/licenses/BSD-2-Clause).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3264535342f6dd2bacce6425cb96c32d6113e25e3adac91a11660be332e764eb?d=identicon)[fahmiardi](/maintainers/fahmiardi)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/fahmiardi-oauth2-server-redis/health.svg)

```
[![Health](https://phpackages.com/badges/fahmiardi-oauth2-server-redis/health.svg)](https://phpackages.com/packages/fahmiardi-oauth2-server-redis)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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