did you find a solution to that , i'm facing the same problem
Aug 17, 2023
16
Level 9
Invalid key supplied only in certains routes
I'm trying to test out some api routes and I keep getting this error but it's strange because if I copy the route and move it, it works.
This is the first part of the error, it's over 300 lines total I'll add the rest if it's important
"message": "Invalid key supplied",
"exception": "LogicException",
"file": "/var/www/btl-visor-new/vendor/league/oauth2-server/src/CryptKey.php",
"line": 67,
"trace": [
{
"file": "/var/www/btl-visor-new/vendor/laravel/passport/src/PassportServiceProvider.php",
"line": 275,
"function": "__construct",
"class": "League\OAuth2\Server\CryptKey",
"type": "->"
},
{
"file": "/var/www/btl-visor-new/vendor/laravel/passport/src/PassportServiceProvider.php",
"line": 256,
"function": "makeCryptKey",
"class": "Laravel\Passport\PassportServiceProvider",
"type": "->"
},{...}
]
Routes
Route::middleware('api')->prefix('api')->group(function () {
//this works
Route::get('/refunds', [PopHelperController::class, 'popRefunds']);
Route::get('/history', [PopHelperController::class, 'popRefundsHistory']);
Route::prefix('pop-helper')->group(function () {
Route::prefix('refunds')->group(function () {
//these show that error
Route::get('/', [PopHelperController::class, 'popRefunds']);
Route::get('/history', [PopHelperController::class, 'popRefundsHistory']);
Route::get('/{id}/products', [PopHelperController::class, 'popRefundProducts']);
Route::get('/{id}/objects', [PopHelperController::class, 'popRefundObjects']);
Route::post('/', [PopHelperController::class, 'postPopRefund']);
});
});
});
As far as I know I'm not using Passport on these routes, in my kernal the api middleware only has 'throttle:100', \Illuminate\Routing\Middleware\SubstituteBindings::class,
I can still test it but I would like to use the actual route structure too, why am I getting this error on those routes?
Please or to participate in this conversation.