Excuse my naivety, but I am new to sessions, cookie based authentication and Python Tornado. I am trying to access an API written in python Tornado, and am using Ember CLI for the client. I can't seem to set cookie values in the request sent to the server. How does one set the cookie correctly in AJAX/Ember.JS?
Techs I'm using:
My situation
What I have: A log in page where users can try to log in.
What I need: A way to set parts of the successful response from the server into a local storage location, or cookie.
What I have: An API endpoint that I am accessing using AJAX
What I need: A way to pass parts of the log-in response data as a 'cookie' as the server is throwing an error saying that the cookie is invalid or missing.
Ok so whomever is running into the same problem, I basically had to set the following ajax setting in my "findAll" function for my model, and on just the authenticate method.
...
xhrFields: {
withCredentials: true
},
success: succsFunction,
error: errorFunction...