title: Laravel : JWT token expired
body: <p>I am using the <a href="https://github.com/tymondesigns/jwt-auth" rel="nofollow noreferrer"><code>tymondesigns/jwt-auth</code></a> package for my app, but it is show <code>token expired</code> message after some time.
  I already set <code>'ttl' =&gt; null</code> and also remove <code>exp</code> but it did not work.</p>
  
  <p>Here is my <code>config/jwt.php</code></p>
  
  <pre><code>&lt;?php
  
  /*
  * This file is part of jwt-auth.
  *
  * (c) Sean Tymon &lt;tymon148@gmail.com&gt;
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
  */
  
  return [
  
  /*
  |--------------------------------------------------------------------------
  | JWT Authentication Secret
  |--------------------------------------------------------------------------
  |
  | Don't forget to set this in your .env file, as it will be used to sign
  | your tokens. A helper command is provided for this:
  | `php artisan jwt:secret`
  |
  | Note: This will be used for Symmetric algorithms only (HMAC),
  | since RSA and ECDSA use a private/public key combo (See below).
  |
  */
  // 'secret' =&gt; 'my-dummy-jwt-token',
  'secret' =&gt; 'key',
  
  /*
  |--------------------------------------------------------------------------
  | JWT Authentication Keys
  |--------------------------------------------------------------------------
  |
  | The algorithm you are using, will determine whether your tokens are
  | signed with a random string (defined in `JWT_SECRET`) or using the
  | following public &amp; private keys.
  |
  | Symmetric Algorithms:
  | HS256, HS384 &amp; HS512 will use `JWT_SECRET`.
  |
  | Asymmetric Algorithms:
  | RS256, RS384 &amp; RS512 / ES256, ES384 &amp; ES512 will use the keys below.
  |
  */
  
  'keys' =&gt; [
  
      /*
      |--------------------------------------------------------------------------
      | Public Key
      |--------------------------------------------------------------------------
      |
      | A path or resource to your public key.
      |
      | E.g. 'file://path/to/public/key'
      |
      */
  
      'public' =&gt; env('JWT_PUBLIC_KEY'),
  
      /*
      |--------------------------------------------------------------------------
      | Private Key
      |--------------------------------------------------------------------------
      |
      | A path or resource to your private key.
      |
      | E.g. 'file://path/to/private/key'
      |
      */
  
      'private' =&gt; env('JWT_PRIVATE_KEY'),
  
      /*
      |--------------------------------------------------------------------------
      | Passphrase
      |--------------------------------------------------------------------------
      |
      | The passphrase for your private key. Can be null if none set.
      |
      */
  
      'passphrase' =&gt; env('JWT_PASSPHRASE'),
  
  ],
  
  /*
  |--------------------------------------------------------------------------
  | JWT time to live
  |--------------------------------------------------------------------------
  |
  | Specify the length of time (in minutes) that the token will be valid for.
  | Defaults to 1 hour.
  |
  | You can also set this to null, to yield a never expiring token.
  | Some people may want this behaviour for e.g. a mobile app.
  | This is not particularly recommended, so make sure you have appropriate
  | systems in place to revoke the token if necessary.
  |
  */
  
  //'ttl' =&gt; env('JWT_TTL', 60),
   'ttl' =&gt; null,
  
  /*
  |--------------------------------------------------------------------------
  | Refresh time to live
  |--------------------------------------------------------------------------
  |
  | Specify the length of time (in minutes) that the token can be refreshed
  | within. I.E. The user can refresh their token within a 2 week window of
  | the original token being created until they must re-authenticate.
  | Defaults to 2 weeks.
  |
  | You can also set this to null, to yield an infinite refresh time.
  | Some may want this instead of never expiring tokens for e.g. a mobile app.
  | This is not particularly recommended, so make sure you have appropriate
  | systems in place to revoke the token if necessary.
  |
  */
  
  'refresh_ttl' =&gt; env('JWT_REFRESH_TTL', 20160),
  
  /*
  |--------------------------------------------------------------------------
  | JWT hashing algorithm
  |--------------------------------------------------------------------------
  |
  | Specify the hashing algorithm that will be used to sign the token.
  |
  | See here: https://github.com/namshi/jose/tree/master/src/Namshi/JOSE/Signer/OpenSSL
  | for possible values.
  |
  */
  
  'algo' =&gt; env('JWT_ALGO', 'HS256'),
  
  /*
  |--------------------------------------------------------------------------
  | Required Claims
  |--------------------------------------------------------------------------
  |
  | Specify the required claims that must exist in any token.
  | A TokenInvalidException will be thrown if any of these claims are not
  | present in the payload.
  |
  */
  
  'required_claims' =&gt; [
      'iss',
      'iat',
     'nbf',
      'sub',
      'jti',
  ],
   //'exp', remove token expire time
  
  /*
  |--------------------------------------------------------------------------
  | Persistent Claims
  |--------------------------------------------------------------------------
  |
  | Specify the claim keys to be persisted when refreshing a token.
  | `sub` and `iat` will automatically be persisted, in
  | addition to the these claims.
  |
  | Note: If a claim does not exist then it will be ignored.
  |
  */
  
  'persistent_claims' =&gt; [
      // 'foo',
      // 'bar',
  ],
  
  /*
  |--------------------------------------------------------------------------
  | Blacklist Enabled
  |--------------------------------------------------------------------------
  |
  | In order to invalidate tokens, you must have the blacklist enabled.
  | If you do not want or need this functionality, then set this to false.
  |
  */
  
  'blacklist_enabled' =&gt; env('JWT_BLACKLIST_ENABLED', true),
  
  /*
  | -------------------------------------------------------------------------
  | Blacklist Grace Period
  | -------------------------------------------------------------------------
  |
  | When multiple concurrent requests are made with the same JWT,
  | it is possible that some of them fail, due to token regeneration
  | on every request.
  |
  | Set grace period in seconds to prevent parallel request failure.
  |
  */
  
  'blacklist_grace_period' =&gt; env('JWT_BLACKLIST_GRACE_PERIOD', 0),
  
  /*
  |--------------------------------------------------------------------------
  | Providers
  |--------------------------------------------------------------------------
  |
  | Specify the various providers used throughout the package.
  |
  */
  
  'providers' =&gt; [
  
      /*
      |--------------------------------------------------------------------------
      | JWT Provider
      |--------------------------------------------------------------------------
      |
      | Specify the provider that is used to create and decode the tokens.
      |
      */
  
      'jwt' =&gt; Tymon\JWTAuth\Providers\JWT\Namshi::class,
  
      /*
      |--------------------------------------------------------------------------
      | Authentication Provider
      |--------------------------------------------------------------------------
      |
      | Specify the provider that is used to authenticate users.
      |
      */
  
      'auth' =&gt; Tymon\JWTAuth\Providers\Auth\Illuminate::class,
  
      /*
      |--------------------------------------------------------------------------
      | Storage Provider
      |--------------------------------------------------------------------------
      |
      | Specify the provider that is used to store tokens in the blacklist.
      |
      */
  
      'storage' =&gt; Tymon\JWTAuth\Providers\Storage\Illuminate::class,
  
  ],
  
   ];
  </code></pre>
  
  <p>Is there any other setting for remove expiry time ?</p>