Skip to content

Commit

Permalink
fix cors errors on attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalydosos committed Dec 23, 2024
1 parent 7ba9f8a commit d25f0b0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/libs/actions/Session/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,11 @@ function invalidateCredentials() {
}

function invalidateAuthToken() {
NetworkStore.setAuthToken('pizza');
Onyx.merge(ONYXKEYS.SESSION, {authToken: 'pizza', encryptedAuthToken: 'pizza'});
// expires the session after 50s
setTimeout(() => {
NetworkStore.setAuthToken('pizza');
Onyx.merge(ONYXKEYS.SESSION, {authToken: 'pizza', encryptedAuthToken: 'pizza', creationDate: new Date().getTime() - CONST.SESSION_EXPIRATION_TIME_MS});
}, 50000);
}

/**
Expand Down

0 comments on commit d25f0b0

Please sign in to comment.