Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

361
Views
How to save JavaScript sessionStorage to django

I have an Sdk to call which returns an applicationID that I need to store in my django application so that if the user is approved can then move to the next page. I trying to save in JS sessionStorage than pass the data to another html page where I'm using ajax to pass it to my django views, the problem is that I need to have this data unique for the user that is logged in. How can I link this data to the current user logged in and so on?

const widget = window.getidWebSdk.init({ apiUrl: '', sdkKey: '', containerId: "targetContainer", flowName: '',

onComplete: (data) => { 
    
    console.log(JSON.stringify(data))
    let appId = data; 
    console.log(data)
    sessionStorage.setItem("appId", JSON.stringify(appId))
    window.location.href = "/kycsubmit";
return;

}, onFail: ({ code, message}) => { console.log("something went wrong: " + message )},

});

second html page

    let application = JSON.parse(sessionStorage.getItem("appId"));
    let kycStatus = application.applicationId


    $.ajax({
    type: "GET",
    dataType: "json",
    url: `api/application/${kycStatus}`,
    headers: {
         'Content-Type': 'application/json',
         'X-API-Key': '',
        },
       
        success: function(data)  {
            document.getElementById("test").innerHTML = data.overallResult.status
            document.getElementById("test-1").innerHTML = application.applicationId
            console.log(data.overallResult.status)
            
        }
     

})
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!