PHPackages                             lacasera/api-jwt-scaffold - 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. lacasera/api-jwt-scaffold

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

lacasera/api-jwt-scaffold
=========================

scaffold jwt authentication for your api

10161[1 issues](https://github.com/lacasera/api-jwt-scaffold/issues)PHPCI failing

Since Oct 7Pushed 6y ago2 watchersCompare

[ Source](https://github.com/lacasera/api-jwt-scaffold)[ Packagist](https://packagist.org/packages/lacasera/api-jwt-scaffold)[ RSS](/packages/lacasera-api-jwt-scaffold/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b3c16af9bdfff432e263c0540cccfe7a560035e791a2baf52e8421b2c082fd82/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c616361736572612f6170692d6a77742d73636166666f6c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lacasera/api-jwt-scaffold)[![Build Status](https://camo.githubusercontent.com/84e67fbde76a2dda2cd096c63e94329f08c90dc55322409562bb83a459ec24bb/68747470733a2f2f7472617669732d63692e6f72672f6c616361736572612f6170692d6a77742d73636166666f6c642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/lacasera/api-jwt-scaffold)[![Quality Score](https://camo.githubusercontent.com/79be673d739fc1c27f987bb056bc39768acfdb89d599f293e1b7e629cb5b7d55/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c616361736572612f6170692d6a77742d73636166666f6c642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/lacasera/api-jwt-scaffold)[![Total Downloads](https://camo.githubusercontent.com/e8f28d551f6a0df8f97b9e748a30eb00484ae8e2bc1a839f0dd76bb23cb80a53/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c616361736572612f6170692d6a77742d73636166666f6c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lacasera/api-jwt-scaffold)

This package helps you quickly scaffold api authentication for you laravel project using

1. [Laravel Passport](https://laravel.com/docs/6.x/passport)
2. [Tymon JWT](https://jwt-auth.readthedocs.io/en/develop/laravel-installation/)

Installation
------------

[](#installation)

`NB: always install this package on a fresh install of laravel since it will overwrite some existing files`

You can install the package via composer:

```
composer require lacasera/api-jwt-scaffold --dev
```

Usage
-----

[](#usage)

1. run the command

```
php artisan make:auth-api
```

```
An Auth and Register Controllers will be generated under the Auth namespace to handle authentication requests to your application.
Feel free to modify them to your applications needs.

```

2. define your routes

```
//api.php

Route::group(['namespace' => 'Auth'], function(){
    Route::get('me', 'AuthController@me');
    Route::post('login', 'AuthController@login');
    Route::get('logout', 'AuthController@logout');
    Route::post('register', 'RegisterController@create');
});
```

3. Make sure your requests to the api routes add the `Accepts: application/json` header.
4. Enjoy.

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Agyenim Boateng Barfi](https://github.com/lacasera)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/lacasera-api-jwt-scaffold/health.svg)

```
[![Health](https://phpackages.com/badges/lacasera-api-jwt-scaffold/health.svg)](https://phpackages.com/packages/lacasera-api-jwt-scaffold)
```

###  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.2M117](/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)
