PHPackages                             santanu/lumen-mongodb-oauth - 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. santanu/lumen-mongodb-oauth

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

santanu/lumen-mongodb-oauth
===========================

OAuth API Authorization based on Lumen Framework and MongoDB

015PHP

Since Sep 18Pushed 8y ago2 watchersCompare

[ Source](https://github.com/santanu-brahma/lumen-mongodb-oauth)[ Packagist](https://packagist.org/packages/santanu/lumen-mongodb-oauth)[ RSS](/packages/santanu-lumen-mongodb-oauth/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

OAuth Library for Lumen &amp; MongoDB
=====================================

[](#oauth-library-for-lumen--mongodb)

Package for creating oauthable authorization based on Lumen Framework and MongoDB.

Package Installations
---------------------

[](#package-installations)

- Add "santanu/lumen-mongodb-oauth": "\*" in your lumen project, then run composer update.
- Copy all migration files from database/migrations to project's db migration directory.
- Run php artisan migrate from project's root directory.
- Add 'client\_id' and 'client\_secret' value in the clients collection.
- Need to copy config files from src/config to project's config directory.
- Now change User model name and path in oauth.php config file.

Configure Application
---------------------

[](#configure-application)

- Model User should be implement Santanu\\Lumen\_Oauth\\Interfaces\\Oauthable
- Add trait for model User Santanu\\Lumen\_Oauth\\Traits\\Oauthable
- Add service provider Santanu\\Lumen\_Oauth\\Providers\\ServiceProvider
- In routes/web.php add following lines for Oauth service,

```
$app->group(['prefix' => 'oauth'], function() use ($app)
{
    $app->post('access', function() use($app) {
		return $app->make('oauth.routes')->accessToken();
    });
	$app->post('refresh', function() use($app) {
		return $app->make('oauth.routes')->refreshToken();
    });
});
```

- In routes add 'oauth' as a middleware in service routes.

Authorization Service
---------------------

[](#authorization-service)

- POST application-url/oauth/access Params: grant\_type(password), client\_id, client\_secret, username, password Response: access\_token, expires\_in, token\_type, scope, refresh\_token
- POST application-url/oauth/refresh Params: grant\_type(refresh\_token), client\_id, client\_secret, refresh-token Response: access\_token, expires\_in, token\_type, scope, refresh\_token
- Send header in all API requests: Authorization: Bearer access\_token

Important Information
---------------------

[](#important-information)

- This is library is based on Lumen and MongoDB if you are looking for Lumen and MySQL package then use it *From: *

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

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/b3402d98ba22f23d2d4ef3314688609c88d1d534dcccc68b0ec69553d94d0ef8?d=identicon)[santanu](/maintainers/santanu)

---

Top Contributors

[![santanu-brahma](https://avatars.githubusercontent.com/u/3183444?v=4)](https://github.com/santanu-brahma "santanu-brahma (1 commits)")

### Embed Badge

![Health badge](/badges/santanu-lumen-mongodb-oauth/health.svg)

```
[![Health](https://phpackages.com/badges/santanu-lumen-mongodb-oauth/health.svg)](https://phpackages.com/packages/santanu-lumen-mongodb-oauth)
```

###  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)
