Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Lumen
  3. Lumen Passport

Lumen Passport

MITPHP0.3.8

A service provider that enables Laravel Passport OAuth2 server functionality in Lumen micro-framework applications.

GitHubGitHub
651 stars137 forks0 contributors

What is Lumen Passport?

Lumen Passport is a PHP package that adapts Laravel Passport to work with the Lumen micro-framework. It solves the problem of adding OAuth2-based API authentication to lightweight Lumen applications by providing a service provider that bridges the two systems. This allows developers to use Laravel Passport's full token-based authentication system without migrating to the heavier Laravel framework.

Target Audience

PHP developers building RESTful APIs with Lumen who need OAuth2 authentication capabilities. It's particularly useful for teams committed to Lumen's micro-framework architecture but requiring enterprise-grade API security.

Value Proposition

Developers choose Lumen Passport because it provides the complete Laravel Passport OAuth2 implementation in Lumen with minimal configuration. Its unique value lies in extending Laravel Passport with Lumen-specific features like route prefixing and multiple tokens per client while maintaining compatibility with existing Laravel Passport documentation and workflows.

Overview

Making Laravel Passport work with Lumen

Use Cases

Best For

  • Adding OAuth2 authentication to existing Lumen API projects
  • Building microservices with Lumen that require token-based security
  • Migrating from Laravel to Lumen while keeping Passport authentication
  • Creating lightweight APIs that need full OAuth2 client management
  • Implementing password grant authentication in Lumen applications
  • Developing API gateways with Lumen that require token issuance

Not Ideal For

  • Applications requiring OAuth2 web authorization flows with user consent pages
  • Projects already built on the full Laravel framework
  • Teams needing a minimal authentication solution without OAuth2 server overhead
  • Environments where database migrations and key management are restrictive

Pros & Cons

Pros

Full OAuth2 Implementation

Brings Laravel Passport's complete token-based authentication to Lumen, including token issuance, client management, and scopes without switching frameworks.

Extended Functionality

Adds features not in standard Laravel Passport, such as multiple tokens per client and client-specific TTLs, enhancing flexibility for simultaneous logins.

Route Prefix Support

Allows custom prefixes for OAuth routes, enabling better API versioning and organization, as shown in the prefix configuration example.

Maintenance Tools

Includes an artisan command (passport:purge) to remove expired tokens, aiding database efficiency and cleanup.

Cons

Setup Complexity

Requires manual modifications to bootstrap files, configuration loading, and service provider registration, increasing initial setup time and error risk.

Compatibility Risks

Breaking changes in Laravel Passport, like version 7.3.2, necessitate workarounds such as using a custom Lumen7Application class, adding maintenance burden.

Limited Web OAuth Support

Omits web-related routes for OAuth authorization pages, making it unsuitable for applications needing interactive user consent flows.

Frequently Asked Questions

Quick Stats

Stars651
Forks137
Contributors0
Open Issues4
Last commit2 years ago
CreatedSince 2016

Tags

#lumen#micro-framework#oauth2#jwt#api-authentication#php#composer-package#passport#api-security

Built With

L
Laravel Passport
L
Lumen
C
Composer
P
PHP

Included in

Lumen328
Auto-fetched 1 day ago

Related Projects

Dingo APIDingo API

A RESTful API package for the Laravel and Lumen frameworks.

Stars9,356
Forks1,269
Last commit4 years ago
Facebook SDKFacebook SDK

Fully unit tested Facebook SDK v5 integration for Laravel & Lumen

Stars689
Forks196
Last commit5 years ago
REST API With LumenREST API With Lumen

Rest API boilerplate for Lumen micro-framework.

Stars486
Forks136
Last commit8 years ago
Lumen GeneratorsLumen Generators

A collection of generators for Lumen and Laravel 5.

Stars350
Forks92
Last commit4 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub