jeudi 30 avril 2020

Laravel CreateApiToken for guest users

In Laravel 5.7, we can pass \Laravel\Passport\Http\Middleware\CreateFreshApiToken::class in the web middleware group. This adds the laravel_token cookie for logged in users.

Is it possible to also pass a cookie for logged out users, so that we can lock API routes with the client middleware, thus authenticating the app but not necessarily the user?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire