designmynight/laravel-mongodb-passport
| Install | |
|---|---|
composer require designmynight/laravel-mongodb-passport |
|
| Latest Version: | v2.1.2 |
| PHP: | >=7.1 |
| License: | MIT |
| Last Updated: | May 7, 2026 |
| Links: | GitHub · Packagist |
No longer maintained
This package is no longer maintained. Recent contributions are part of our own migration to the official Laravel MongoDB package and their recommended approach for using Passport with MongoDB.
Laravel MongoDB Passport
A service provider to add support for Laravel Passport and MongoDB.
Table of contents
Installation
Installation using composer:
composer require designmynight/laravel-mongodb-passport
You need to have your App\User class extend DesignMyNight\Mongodb\Auth\User.php instead of the default Illuminate\Foundation\Auth\User. This user class extends larvel-mongodb eloquent user as well as adding all the standard and required authentication and laravel passport traits.
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use DesignMyNight\Mongodb\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
}
Laravel version Compatibility
| Laravel | Passport | Package |
|---|---|---|
| 5.5.x | 4.0.x, 5.0.x, 6.0.x, 7.0.x | 1.1.x |
| 5.6.x | 4.0.x, 5.0.x, 6.0.x, 7.0.x | 1.1.x |
| 6.x | 4.0.x, 5.0.x, 6.0.x, 7.x, 8.x | 1.2.x |
| 8.x | 10.x | 3.x |
And add the service provider in config/app.php:
DesignMyNight\Mongodb\MongodbPassportServiceProvider::class,
For usage with Lumen, add the service provider in bootstrap/app.php.
$app->register(DesignMyNight\Mongodb\MongodbPassportServiceProvider::class);
The service provider will overide the default laravel passport models in order to use mongodb's implementation of eloquent. There is no need to register any additional classes or add any additional configuration other than those outlined in Laravel Passport and MongoDB.
Related Packages
A very simple activity logger to monitor the users of your website or applicatio...
A very simple activity logger to monitor the users of your website or applicatio...
Laravel Passport provides OAuth2 server support to Laravel and use mongodb.
Filament v4/v5 admin resources for managing Laravel Passport OAuth2 clients, tok...
The missing laravel passport feature for social authentication