mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 05:12:20 +00:00
log
This commit is contained in:
@@ -156,13 +156,15 @@ export async function getSessionCookieByLoginName(
|
||||
|
||||
if (stringifiedCookie?.value) {
|
||||
const sessions: SessionCookie[] = JSON.parse(stringifiedCookie?.value);
|
||||
|
||||
console.log("getSessionCookieByLoginName", loginName, organization);
|
||||
const found = sessions.find((s) =>
|
||||
s.loginName === loginName && organization
|
||||
? s.organization === organization
|
||||
: true
|
||||
);
|
||||
if (found) {
|
||||
console.log("getSessionCookieByLoginName found", found);
|
||||
|
||||
return found;
|
||||
} else {
|
||||
return Promise.reject("no cookie found with loginName: " + loginName);
|
||||
|
||||
Reference in New Issue
Block a user