adjusted login check
This commit is contained in:
parent
941d2f1c00
commit
58391173e6
@ -21,11 +21,14 @@ async function login(widget, service) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
const connectSidCookie = responseHeaders["set-cookie"];
|
||||||
|
if (!connectSidCookie) {
|
||||||
const sid = cache.get(`${sessionSIDCacheKey}.${service}`);
|
const sid = cache.get(`${sessionSIDCacheKey}.${service}`);
|
||||||
if (sid) {
|
if (sid) {
|
||||||
return sid;
|
return sid;
|
||||||
}
|
}
|
||||||
const connectSidCookie = responseHeaders["set-cookie"]
|
}
|
||||||
|
connectSidCookie = connectSidCookie
|
||||||
.find((cookie) => cookie.startsWith("connect.sid="))
|
.find((cookie) => cookie.startsWith("connect.sid="))
|
||||||
.split(";")[0]
|
.split(";")[0]
|
||||||
.replace("connect.sid=", "");
|
.replace("connect.sid=", "");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user