only put if hasSetKeys explicitly false

This commit is contained in:
Abhinav-grd 2021-08-30 23:22:56 +05:30
parent a7a10f1a19
commit c21b20df95

View file

@ -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) {