You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, the login endpoint has api middleware. While the application is working fine with Vue frontend, I have trouble getting tests for ''login and ''logout funtions. This is because I am using $request->session in the Controller for both login and logout methods. This is creating problem for the tests and the tests fail with error RuntimeException: Session store not set on request
Is there a way to override and set the middleware to web for only the failing tests to check if it works ?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am using Laravel Sanctum SPA authentication in our application that is being implemented as a Laravel package.
I have following code in ServiceProvider:
So, the
login
endpoint hasapi
middleware. While the application is working fine with Vue frontend, I have trouble getting tests for ''loginand ''logout
funtions. This is because I am using$request->session
in the Controller for both login and logout methods. This is creating problem for the tests and the tests fail with error RuntimeException: Session store not set on requestIs there a way to override and set the middleware to
web
for only the failing tests to check if it works ?Beta Was this translation helpful? Give feedback.
All reactions