Django CSRF/Session Validation Fix

Job ID: 39650074

Budget: ₹600 – ₹1,500 INR

Django Authentication Issue - CSRF/Session Problems with cURL Requests
Problem Description:

I am encountering persistent CSRF and session validation issues. Despite following standard procedures, my authenticated session isn't being maintained.

Current Behavior:

Successful login (302 redirect to /admin-dashboard/) with new sessionid and rotated csrftoken

Subsequent GET requests to /admin-dashboard/ get redirected back to /web_login/

Verified cookies are being saved and sent properly in requests

Technical Details Observed:

Using fresh CSRF tokens from cookies.txt for each request

Both cookies (sessionid and csrftoken) appear valid with correct domain/path

HTTPOnly flag properly handled

Tried with all recommended headers (Referer, X-CSRFToken, Origin, etc.)

What I Need:
A Django expert who can:

Analyze the full authentication flow

Identify why session isn't persisting between requests

Provide working cURL commands or Python script

Explain any missing security validations (e.g., User-Agent checks, IP binding)

Evidence Available:

Complete cURL verbose logs (successful login + failed dashboard access)

Cookies file contents

Server response headers