From ff01bc4652e77987f927e743fc6247ca3ad4aa72 Mon Sep 17 00:00:00 2001 From: Michael Scharl Date: Sun, 4 Aug 2019 13:59:36 +0200 Subject: [PATCH] Updated cookie parsing as suggested in the Issues --- oebb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oebb.js b/oebb.js index bad2ffe..b6e0866 100644 --- a/oebb.js +++ b/oebb.js @@ -155,7 +155,7 @@ function authenticationRequest() { reject(error, {}) } if(body.accessToken && body.accessToken !== ""){ - resolve(merge(body, {cookie: cookie.parse(response.headers['set-cookie'][0])['ts-cookie']})); + resolve(merge(body, {cookie: cookie.parse(response.headers.accesstoken)})); }else{ reject("got no access token", body) }