PHPackages                             mark-domkan/env-token-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. mark-domkan/env-token-auth

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

mark-domkan/env-token-auth
==========================

Adds the ability to use environtment token for the auth:api middleware.

1.0.0(5y ago)078MITPHPPHP &gt;=7.2.0

Since Mar 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/markdomkan/env-token-auth)[ Packagist](https://packagist.org/packages/mark-domkan/env-token-auth)[ Docs](https://github.com/markdomkan/env-token-auth)[ RSS](/packages/mark-domkan-env-token-auth/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

env-token-auth
==============

[](#env-token-auth)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5a73210ae1199acd241dab3b1c30b598e12e1cbb13c67f67d06de96fdd85b567/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61726b2d646f6d6b616e2f656e762d746f6b656e2d617574682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mark-domkan/env-token-auth)[![Total Downloads](https://camo.githubusercontent.com/8c075a62a5dc5609693b40dc60dd7b6b522417f25362bd67bceb4ffb2363898d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61726b2d646f6d6b616e2f656e762d746f6b656e2d617574682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mark-domkan/env-token-auth)

Adds the ability to use token saved in env for the auth:api middleware.

Install
-------

[](#install)

1. Install the package with composer:

    ```
    composer require markdomkan/env-token-auth
    ```
2. Set the api guard driver to `env-token` in the file `config/auth.php`:

    ```
    'guards' => [
        // ...

        'api' => [
            'driver'   => 'env-token', //
