A simple way to switch your admin panel to API mode and interact via tokens
- MoonShine 3+
- Laravel 10+
- PHP 8.2+
composer require moonshine/jwt
php artisan vendor:publish --provider="MoonShine\JWT\Providers\JWTServiceProvider"
Add the base64 encoded secret key to the JWT_SECRET variable in the .env file
JWT_SECRET=YOUR_BASE64_SECRET_HERE
$config
->middlewares([])
->authPipelines([
JWTAuthPipe::class,
])
->authMiddleware(AuthenticateApi::class);