only put if hasSetKeys explicitly false
This commit is contained in:
parent
a7a10f1a19
commit
c21b20df95
|
@ -140,15 +140,19 @@ export const isTokenValid = async () => {
|
||||||
'X-Auth-Token': getToken(),
|
'X-Auth-Token': getToken(),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (!resp?.data?.hasSetKeys) {
|
try {
|
||||||
try {
|
if (!resp.data['hasSetKeys']) {
|
||||||
putAttributes(
|
try {
|
||||||
getToken(),
|
await putAttributes(
|
||||||
getData(LS_KEYS.ORIGINAL_KEY_ATTRIBUTES)
|
getToken(),
|
||||||
);
|
getData(LS_KEYS.ORIGINAL_KEY_ATTRIBUTES)
|
||||||
} catch (e) {
|
);
|
||||||
logError(e, 'put attribute failed');
|
} catch (e) {
|
||||||
|
logError(e, 'put attribute failed');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
logError(e, 'hasSetKeys not set in session validity response');
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in a new issue