This commit is contained in:
2025-12-26 06:37:30 +01:00
parent 98aaa94b80
commit b02399c64d
50 changed files with 112 additions and 105 deletions
@@ -42,7 +42,7 @@ export default function postLoginResponseHandler({
if (httpResponse?.success) {
let encryptedPayload = encrypt({
data: JSON.stringify(httpResponse.payload),
data: JSON.stringify(httpResponse.singleRes),
encryptionKey,
encryptionSalt,
});
@@ -61,9 +61,9 @@ export default function postLoginResponseHandler({
if (httpResponse.csrf && !skipWriteAuthFile) {
writeAuthFile(
httpResponse.csrf,
JSON.stringify(httpResponse.payload),
cleanupTokens && httpResponse.payload?.id
? { userId: httpResponse.payload.id }
JSON.stringify(httpResponse.singleRes),
cleanupTokens && httpResponse.singleRes?.id
? { userId: httpResponse.singleRes.id }
: undefined
);
}
@@ -84,7 +84,7 @@ export default function postLoginResponseHandler({
`${authKeyName}=${encryptedPayload};samesite=strict;path=/;HttpOnly=true;Expires=${COOKIE_EXPIRY_DATE}${
secureCookie ? ";Secure=true" : ""
}`,
`${csrfName}=${httpResponse.payload?.csrf_k};samesite=strict;path=/;HttpOnly=true;Expires=${COOKIE_EXPIRY_DATE}`,
`${csrfName}=${httpResponse.singleRes?.csrf_k};samesite=strict;path=/;HttpOnly=true;Expires=${COOKIE_EXPIRY_DATE}`,
]);
if (debug) {