Laravel Passport token lifetime : <p>I don't get what I'm doing wrong.
I can't set token expiration time.</p>

<pre><code>&lt;?php

namespace App\Providers;

class AuthServiceProvider extends ServiceProvider
{
    public function boot()
    {
        $this-&gt;registerPolicies();

        Passport::tokensExpireIn(Carbon::now()-&gt;addDays(1));
        Passport::refreshTokensExpireIn(Carbon::now()-&gt;addDays(30));
    }
}
</code></pre>

<p>BUT when I call <code>$user-&gt;createToken()</code>, for example like this:</p>

<pre><code>&lt;?php
// as a demo
namespace App\Http\Middleware;

class ParseSpecialToken
{
    public function handle($request, Closure $next)
    {
        $user = User::find(1);
        $accessToken = $user-&gt;createToken('Some token')-&gt;accessToken;
        $request-&gt;headers-&gt;add(['Authorization' =&gt; 'Bearer '. $accessToken]);

        return $next($request);
    }
}
</code></pre>

<p>Token expiration is still 1 year, not 1 day. Why? How to change exp time?</p>
