updates
This commit is contained in:
parent
224dbf4175
commit
7e83ab8d0e
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "datasquirel",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.8",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -131,7 +131,7 @@ module.exports = async function ({ key, payload, database, response, encryptionK
|
||||
encryptionSalt,
|
||||
});
|
||||
|
||||
response.setHeader("Set-Cookie", [`datasquirelAuthKey=${encryptedPayload};samesite=strict;path=/;HttpOnly=true;Secure=true`, `csrf=${httpResponse.csrf};samesite=strict;path=/;HttpOnly=true`]);
|
||||
response.setHeader("Set-Cookie", [`datasquirelAuthKey=${encryptedPayload};samesite=strict;path=/;HttpOnly=true;Secure=true`, `csrf=${httpResponse.payload.csrf};samesite=strict;path=/;HttpOnly=true`]);
|
||||
}
|
||||
|
||||
/** ********************************************** */
|
||||
|
@ -21,6 +21,7 @@ const decrypt = require("../functions/decrypt");
|
||||
* @param {String} encryptionSalt - Encryption Salt
|
||||
*/
|
||||
module.exports = function ({ request, encryptionKey, encryptionSalt }) {
|
||||
try {
|
||||
/**
|
||||
* Grab the payload
|
||||
*
|
||||
@ -90,6 +91,18 @@ module.exports = function ({ request, encryptionKey, encryptionSalt }) {
|
||||
success: true,
|
||||
payload: userObject,
|
||||
};
|
||||
} catch (error) {
|
||||
/**
|
||||
* Return User Object
|
||||
*
|
||||
* @description Return User Object
|
||||
*/
|
||||
return {
|
||||
success: false,
|
||||
payload: null,
|
||||
msg: error.message,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
/** ********************************************** */
|
||||
|
Loading…
Reference in New Issue
Block a user