Skip to main content
0 votes
0 answers
8 views

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 ...
henrbu's user avatar
  • 189
0 votes
0 answers
59 views

Laravel Sanctum gives me 401 error despite using XSRF-TOKEN and cookies

I'm trying to configure Laravel Sanctum to create sessions with a user after my Sign In with Google endpoint verifies their JWT. I keep getting a 401 error with every endpoint that uses auth:sanctum ...
Velo's user avatar
  • 143
0 votes
0 answers
23 views

Access Laravel Sanctum API from a basic HTML Form

When I access my Laravel sanctum API with Postman, it works properly. This is the code of routes\api.php: use App\Http\Controllers\PoiController; use App\Http\Controllers\AuthController; use ...
mas budi's user avatar
0 votes
0 answers
39 views

Laravel reverb auth with sanctum

I have Laravel reverb private channel and when try to listen data not return also when make it as public channel data returned successfully: In my event I make broadcast with static data but not ...
Eslam Elbadry's user avatar
0 votes
1 answer
54 views

How do I protect my endpoints from data harvest?

Sorry for my lack of CSRF understanding, but shouldnt this Sanctum feature make it pretty hard to access my endpoints from other than my frontend app? Everything is working in my frontend (SPA), ...
AP87's user avatar
  • 491
0 votes
0 answers
30 views

Laravel sanctum during testing: "Session store not set on request."

This error happens very often for people, most of the time because SANCTUM_STATEFUL_DOMAINS is not set correctly. I did set it correctly for local development but the error happens during testing, e.g....
Tim's user avatar
  • 953
0 votes
0 answers
80 views

Api authentication with sanctum not working in laravel-11

I am using Sanctum in my laravel 11 application. Able to create token in login. But api is not able to authenticate using the generated token. No error showing. The server stops with showing any error....
Jyothi's user avatar
  • 73
0 votes
0 answers
15 views

Laravel Sanctum for Chrome Extension User Authentication

I'm building a REST API backend in Laravel for a Google Chrome extension and need advice on how to approach authentication. My research suggests using Sanctum, but all examples I’ve found focus on ...
The Ginger Fox's user avatar
1 vote
0 answers
46 views

laravel sanctum and default `auth:web`

Just because my understanding of the sanctum package seems to be wrong in some places: 1.) I thought by reading the config of sanctum it will use the default /* |---------------------------------------...
gamedev's user avatar
  • 77
0 votes
0 answers
11 views

Laravel Sanctum tokem mismatch issue

I am using laravel/sanctum on my backend, and nuxt 3 app on frontend. When I restart my container, my laravel app start giving 419 error on api calls because csrf token mismatch. A quick resolution is ...
Bakhtawar Gill's user avatar
0 votes
0 answers
52 views

Accessing API server through ngrok causing 419

(I have been digging this for over 24 hours now and have tried everything that I could find online), so there is a lot of detail, but I'll try to keep it as objective as I can). I'm trying to access ...
dotNET's user avatar
  • 35k
0 votes
0 answers
55 views

CSRF Token With Laravel Sanctum

Following Laravel docs, when making a request to a laravel backend API that uses Sanctum, the SPA must first make a request to sanctum/csrf-token to get the CSRF token which you must then pass to all ...
Chukwuka Osamor's user avatar
0 votes
1 answer
33 views

auth:sanctum middleware on logout not set user_id field null session

When I log out with auth:sanctum middleware , the user_id field on sessions tabel is not set to null, unlike when I don't use it. Route::post('/logout', function (Request $request) { Auth::guard('...
none's user avatar
  • 55
0 votes
0 answers
18 views

Laravel sanctum SPA on logout not set user_id field null [duplicate]

I use Laravel sanctum SPA specifically through sessions and cookies when logging out the user_id field in Database is not set to null after the user logs out, but it remains until another request ...
none's user avatar
  • 55
2 votes
0 answers
37 views

How to use Cookies based session authentication (Sanctum from Laravel 11) with Vue3

I have two platforms: one built with pure PHP and session-based authentication, and the other using Laravel 11 and Vue 3. We have the authentication logic implemented on the first platform, and I'm ...
Ahmed Alaa ElDin's user avatar

15 30 50 per page
1
2 3 4 5
45