summaryrefslogtreecommitdiff
path: root/frontend/static/js/src/auth.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/static/js/src/auth.js')
-rw-r--r--frontend/static/js/src/auth.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/frontend/static/js/src/auth.js b/frontend/static/js/src/auth.js
index 26da79d..42a92c5 100644
--- a/frontend/static/js/src/auth.js
+++ b/frontend/static/js/src/auth.js
@@ -36,15 +36,24 @@ var Auth =
document.cookie = "session="+Auth.session+";path=/;domain=.scannerjammer.com;max-age=1086400"
Auth.success()
},
+//http://i.imgur.com/kqpf9wX.png yes i see so do we just need to add cors headers? yes, what about nginx, did we restart it?
+//no good yet
checkin: function ()
{
d.warn("CHECK IN")
- $.post(API.URL.auth.checkin, {'session':Auth.session}, Auth.checkinCallback)
+ $.ajax(API.URL.auth.checkin, {
+ type: "POST",
+ data: { 'session':Auth.session, },
+ xhrFields: {
+ withCredentials: true
+ },
+ }).success(Auth.checkinCallback);
},
checkinCallback: function (raw)
{
var lines = API.parse("/auth/checkin", raw)
if (! lines.length) return
+ //so we should just return "OK" right? looks sso
if (lines[0] !== "OK")
{
alert(lines[0].split("\t")[1])