Closed besfortoruci closed 2 years ago
Hey there,
Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.
Thanks!
Was this ever solved? A few months ago i noticed i couldn't get cookie auth working for the SPA in api.php so i loved it to web where it works fine.
Now I'm adding an API/ Mobil end points in api.php and I can't authenticate.
Tested with:
Description:
When using sanctum auth in api.php, it is returning
message: unauthenticated
The same thing works on web.php:
It turns out that '
throttle:api'
on Kernel.php is breaking it, and it is also looking for EncryptCookies::class and StartSession::class in order to make it work.I just tested without throttle:api and added EncryptCookies and StartSession. It works normally, but I believe this is not a fix.
Example:
FYI: disabling
'middleware' => ['web'],
on /config/sanctum.php doesn't do anything. This is also removed during breeze api installation.Steps To Reproduce:
*Laravel Breeze:*
*Laravel Fortify:*