PHPackages                             atarek/jwt - 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. atarek/jwt

ActiveLibrary

atarek/jwt
==========

Jwt token authentication based on the laravel framework

361PHP

Since Sep 5Pushed 6y ago1 watchersCompare

[ Source](https://github.com/a-tarek/jwt)[ Packagist](https://packagist.org/packages/atarek/jwt)[ RSS](/packages/atarek-jwt/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Atarek\\Jwt
===========

[](#atarekjwt)

This package made for handling token based authentication in laravel projects. It uses two types of tokens an access token and a refresh token both are generated when the user is successfully authenticated. It also support multiple table authentication.

###### This package has support for only EloquentUserProvider any other providers will not work

[](#this-package-has-support-for-only-eloquentuserprovider-any-other-providers-will-not-work)

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

[](#installation)

You can install it via composer

```
composer require atarek\jwt
```

Then add JwtServiceProvider to the list of providers in app.php

```
'providers' => [
        // ...
        Atarek\Jwt\Providers\JwtServiceProvider::class,
        //...
],

```

Next run the following to publish the package

```
php artisan vendor:publish --provider="Atarek\Jwt\Providers\JwtServiceProvider"
```

Usage
-----

[](#usage)

Configure the auth.php guard driver to jwt

```
'api' => [
       'driver' => 'jwt',
       'provider' => 'users',
],

```

The provider\_name must match the provider name in auth.php

```
