Flask - unable to get cookies

According to the above, i assume you are using a frontend application based on any other framework and using libraries like axios, fetch, request, etc to hit API on the flask.

So, you might have missed out that you need to set a flag in request to allow sending cookies. Refer to below links to find ways to do it:

  1. Fetch API: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#Sending_a_request_with_credentials_included
    fetch('https://example.com', {
      credentials: 'include'
    });
  1. XMLHttpRequest
    var xhr = new XMLHttpRequest();
    xhr.open('GET', 'http://example.com/', true);
    xhr.withCredentials = true;
    xhr.send(null);

Correct me, if doesn't solve the problem.