Fix 401 errors between Vue frontend and Laravel Sanctum API

Quick task for Laravel specialist: Our Vue single-page app talks to a Laravel API with Sanctum cookie authentication. Login works, but later requests randomly return 401 ("CSRF token mismatch" or "Unauthenticated"), mostly after the user has been idle or on Safari. Domains are app.example.com and api.example.com. I suspect session domain, SameSite or stateful domain settings. I want it diagnosed against our setup, fixed, and covered by a couple of feature tests. Ready to hire and get started immediately.

Category: Development & Software

Skills Required: LaravelPHPSanctumVue.jsAPI Authentication

Budget Range: $100 - $100 USD

Experience Level: Intermediate

Related Developer Talent & Ecosystem Links:

Development & Software Posted 11/20/2026 Practice Opportunity • Free Bid

Fix 401 errors between Vue frontend and Laravel Sanctum API

Project Deliverables & Description

Quick task for Laravel specialist:
Our Vue single-page app talks to a Laravel API with Sanctum cookie authentication. Login works, but later requests randomly return 401 ("CSRF token mismatch" or "Unauthenticated"), mostly after the user has been idle or on Safari. Domains are app.example.com and api.example.com. I suspect session domain, SameSite or stateful domain settings. I want it diagnosed against our setup, fixed, and covered by a couple of feature tests.

Ready to hire and get started immediately.

Required Skills & Technologies

Sign In to Submit a Bid

Bidding is restricted to registered freelance users. Sign in to submit details, propose custom payment milestones, and lock funds in escrow.

Contract Parameters

Budget Setup

$100

fixed Rate Structure

Experience Level

Intermediate

Target expertise level requested

Project Scope

Intermediate

Target project delivery scope

Contract Identifier: 9a3a21da

Professional Trust Score

ESCROW FUNDING SECURED$100 LOCKED

Client holds verified capital secured in project escrow holds.

Client Identity Verified

Corporate background confirmed

Escrow Lock Enforcement

Secure milestone hold verified

BotDigit Arbitrated

Arbitration protection active

HomeJobs
Get Started
ExploreSign In