Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Emincmg's avatar

How come some of our users get 'Session store not set on request' error while others does not?

Hello, I have a weird error happening here requesting further help with this. We have a web application running on Vue/Nuxt on frontend and Laravel. The API is served by Sanctum. But some users having problems logging in, they get 'Session store not set on request' but this happens only small portion of our users. Others are logging in and using the application just fine.

My login method:

public function login(LoginRequest $request): JsonResponse
    {
        $credentials = $request->validated();
        if (Auth::attempt($credentials)) {
            $request->session()->regenerate();
            $user = $request->user();
           return response()->json(['success' => true, 'user' => $user],200);
        } else {
            return response()->json(['message' => 'Login failed, please check your credentials and try again.'], 401);
        }
    }

Any help on this? Im so confused about how it works on some and not others.

0 likes
1 reply
jlrdw's avatar

Are the ones having trouble on mobile devices?

Please or to participate in this conversation.