Replies: 2 comments 1 reply
-
I have the same problem. |
Beta Was this translation helpful? Give feedback.
-
I've seen a couple valid-looking solutions in this issue, where the presence of session authentication middleware was loading a session that then caused the sanctum auth to fail. My problem, however, only happens during tests, and after extensive digging it appears that it is caused by the approach Laravel takes to unit test setup, where the Laravel application is only booted once at the beginning of each test, and not per-request, as would normally happen. Since it does not get torn down after each request, calls like In my case, Laravel Nova had a call of My fix for my particular case was to change There may be room for a more general fix in Laravel's test runner logic, but I'm not sure exactly what you could do without breaking other functionality at the same time. |
Beta Was this translation helpful? Give feedback.
-
I am having problem with laravel sanctum.
I am using laravel sanctum with my vue js frontend which is eventually translating to SPA. Which haven't done yet.
I am getting this error on using auth:sanctum middleware.
BadMethodCallException
Method Illuminate\Auth\RequestGuard::viaRemember does not exist.
Beta Was this translation helpful? Give feedback.
All reactions