PHPackages                             iamnotstatic/laravel-api-auth - 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. iamnotstatic/laravel-api-auth

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

iamnotstatic/laravel-api-auth
=============================

A Laravel Package for easy API authentication setup with passport

v1.0.2(6y ago)301181MITPHPCI failing

Since Apr 8Pushed 6y ago3 watchersCompare

[ Source](https://github.com/iamnotstatic/laravel-api-auth)[ Packagist](https://packagist.org/packages/iamnotstatic/laravel-api-auth)[ RSS](/packages/iamnotstatic-laravel-api-auth/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Laravel API Auth
================

[](#laravel-api-auth)

[![GitHub issues](https://camo.githubusercontent.com/de22cc8fba78117598957515e60f88081b593a4cd094773b7f2b516e572fed67/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f69616d6e6f747374617469632f6c61726176656c2d6170692d61757468)](https://github.com/iamnotstatic/laravel-api-auth/issues)[![GitHub stars](https://camo.githubusercontent.com/bc1d54e2f65f59ff3a91c3729d2e098bf2928ec39a6901b35c6ab84b48c28088/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f69616d6e6f747374617469632f6c61726176656c2d6170692d61757468)](https://github.com/iamnotstatic/laravel-api-auth/stargazers)[![GitHub license](https://camo.githubusercontent.com/8f0389acae6ea7b43276d83e15054f67f8d5863a3ae99587cab389425b39661f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f69616d6e6f747374617469632f6c61726176656c2d6170692d61757468)](https://github.com/iamnotstatic/laravel-api-auth)[![Total Downloads](https://camo.githubusercontent.com/a73b0932e54a2e4a5c0aebba81fd64ef1c1c48dd90b1bc1d890ed9909ffd2efd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f69616d6e6f747374617469632f6c61726176656c2d6170692d61757468)](https://github.com/iamnotstatic/laravel-api-auth)

Introduction
------------

[](#introduction)

> A Laravel Package for easy API authentication setup with passport

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

[](#installation)

To get the latest version of Laravel Api Auth, simply require it

```
composer require iamnotstatic/laravel-api-auth
```

Configuration
-------------

[](#configuration)

You can publish the configuration file using this command:

```
php artisan vendor:publish --provider="Iamnotstatic\LaravelAPIAuth\LaravelAPIAuthServiceProvider"
```

Migrate your database after installing the package

```
php artisan migrate
```

This command will create the encryption keys needed to generate secure access tokens. In addition, the command will create "personal access" and "password grant" clients which will be used to generate access tokens

```
php artisan passport:install
```

Next, you should call the Passport::routes method within the boot method of your AuthServiceProvider. This method will register the routes necessary to issue access tokens and revoke access tokens, clients, and personal access tokens:

```
