3 use Laravel\Sanctum\Sanctum;
8 |--------------------------------------------------------------------------
10 |--------------------------------------------------------------------------
12 | Requests from the following domains / hosts will receive stateful API
13 | authentication cookies. Typically, these should include your local
14 | and production domains which access your API via a frontend SPA.
18 'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
20 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
21 Sanctum::currentApplicationUrlWithPort()
25 |--------------------------------------------------------------------------
27 |--------------------------------------------------------------------------
29 | This array contains the authentication guards that will be checked when
30 | Sanctum is trying to authenticate a request. If none of these guards
31 | are able to authenticate the request, Sanctum will use the bearer
32 | token that's present on an incoming request for authentication.
39 |--------------------------------------------------------------------------
41 |--------------------------------------------------------------------------
43 | This value controls the number of minutes until an issued token will be
44 | considered expired. If this value is null, personal access tokens do
45 | not expire. This won't tweak the lifetime of first-party sessions.
52 |--------------------------------------------------------------------------
54 |--------------------------------------------------------------------------
56 | When authenticating your first-party SPA with Sanctum you may need to
57 | customize some of the middleware Sanctum uses while processing the
58 | request. You may change the middleware listed below as required.
63 'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
64 'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,