Updates
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user