INSR-8742:
Fixing the issue with missing session key.
This commit is contained in:
parent
62430bee8c
commit
ecf5ba48ab
2 changed files with 4 additions and 4 deletions
|
|
@ -14,8 +14,7 @@ const cookieNames = Object.freeze({
|
||||||
|
|
||||||
// Existing Safelite.com cookies
|
// Existing Safelite.com cookies
|
||||||
DXDEV: 'dxdev',
|
DXDEV: 'dxdev',
|
||||||
SESSION_ID: 'sid',
|
SESSION_ID: 'sid'
|
||||||
SESSION_KEY: 'skey'
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const cookieExpirations = Object.freeze({
|
const cookieExpirations = Object.freeze({
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ export function getDeviceIdValue() {
|
||||||
Gets value of skey cookie, returns 0 if not found.
|
Gets value of skey cookie, returns 0 if not found.
|
||||||
*/
|
*/
|
||||||
export function getSessionKeyValue() {
|
export function getSessionKeyValue() {
|
||||||
const cookieValue = getCookieValueByName(cookieNames.SESSION_KEY);
|
const cookieValue = getCookieValueByName(cookieNames.ISS_SESSION_KEY);
|
||||||
|
|
||||||
if (cookieValue) {
|
if (cookieValue) {
|
||||||
return cookieValue;
|
return cookieValue;
|
||||||
|
|
@ -281,7 +281,8 @@ export function setSessionIdIfUnset(value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setSessionKeyIfUnset(value) {
|
export function setSessionKeyIfUnset(value) {
|
||||||
if (!isCookieSet(cookieNames.ISS_SESSION_KEY)) {
|
console.error("Current SessionKey Value: " + getSessionKeyValue() + " - New Value: " + value);
|
||||||
|
if (getSessionKeyValue() === 0) {
|
||||||
setCookieProperties(
|
setCookieProperties(
|
||||||
{
|
{
|
||||||
[cookieNames.ISS_SESSION_KEY]: value
|
[cookieNames.ISS_SESSION_KEY]: value
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue