skip to Main Content

Laravel Socialite Google OAuth with Sanctum: Session created but user_id is null after login

I'm building an API-only SPA with Laravel Sanctum and Nuxt3, using cookie-based session authentication. I’ve implemented Google OAuth using Laravel Socialite. Here’s my current setup for the Google OAuth flow: public function googleCallback() { $googleUser = Socialite::driver('google')->stateless()->user(); $user = $this->authRepository->show($googleUser->email);…

VIEW QUESTION
Back To Top
Search