Open jaskaran-online opened 3 weeks ago
@jaskaran-online this is probably because your authentication is not correctly setup and therefor in middleware Http/Middleware/Authenticate.php you are being redirected to /login (route('login'). except Filament does not have that url by default. as your panel is probably at /admin/login. Please check auth (bearer token). Because middleware Auth is failing.
or disable auth for that resource see: https://filamentphp.com/plugins/rupadana-api-service#public-api
you could try changing this behaviour by using:
return $request->expectsJson() ? null : Filament::getCurrentPanel()?->getLoginUrl();
then at least you will get redirected to the filament login url and not get laravel error
facing the same problem
@jaskaran-online this is probably because your authentication is not correctly setup and therefor in middleware Http/Middleware/Authenticate.php you are being redirected to /login (route('login'). except Filament does not have that url by default. as your panel is probably at /admin/login. Please check auth (bearer token). Because middleware Auth is failing.
or disable auth for that resource see: https://filamentphp.com/plugins/rupadana-api-service#public-api
rather don't want to set it as public api if possible.
Then you have to make sure you setup sanctum authentication correctly. Create a token with correct abilities. And use that token as your bearer http header.
What happened?
localhost:8000/api/products
i have create Product api service using following command
php artisan make:filament-api-service ProductResource
Route List
Postman
How to reproduce the bug
its showing routes on artisan route:list but when try to access using postman getting error config fie![image](https://github.com/rupadana/filament-api-service/assets/42887065/7e07a701-d8a2-43fb-aa10-793a03977dc1)
Package Version
3.2.4
PHP Version
8.3
Laravel Version
10.10
Which operating systems does with happen with?
Windows
Notes
No response