designmynight/laravel-mongodb-passport
Laravel MongoDB Passport lets you use Laravel Passport’s OAuth2 server with MongoDB, storing clients, tokens, and related Passport data in Mongo collections instead of a relational database. Ideal for Laravel apps already built on MongoDB.
Executive summary: This package lets our Laravel application keep MongoDB as its system of record while still using Laravel Passport for API authentication. It can reduce time-to-market and avoid standing up a separate relational database just for OAuth2 token storage. The trade-off is dependency risk: it is a small, MIT-licensed community package in a security-sensitive area. Recommendation: run a short spike and security/engineering review, then adopt only if token lifecycle and upgrade testing pass; otherwise fall back to native Passport with a relational database or a managed identity provider.
For engineering: The adapter bridges Passport’s Eloquent assumptions to MongoDB. Validate client storage, access/refresh token flows, revocation, personal access tokens, and version compatibility. Pin versions, add integration tests, and document a fork/maintenance plan. Avoid custom OAuth code unless the adapter proves unsuitable.
How can I help you explore Laravel packages today?