Skip to content

Commit

Permalink
fix: syntax error being thrown in Firefox for anonymous objects with …
Browse files Browse the repository at this point in the history
…computed property names (#241)
  • Loading branch information
nickytonline authored Aug 15, 2023
1 parent 2f8617f commit 00ba2c8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/utils/checkAuthentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ export const getAuthToken = async (): Promise<string> => (await chrome.storage.s

export const optLogOut = () => {
void removeAuthTokenFromStorage();
void chrome.storage.local.set({ [OPEN_SAUCED_OPTED_LOG_OUT_KEY]: true });
const optedLogout = { [OPEN_SAUCED_OPTED_LOG_OUT_KEY]: true };

void chrome.storage.local.set(optedLogout);
};

export const optLogIn = async () => {
if (typeof window === "undefined") {
return;
}
void chrome.storage.local.set({ [OPEN_SAUCED_OPTED_LOG_OUT_KEY]: false });
const optedLogout = { [OPEN_SAUCED_OPTED_LOG_OUT_KEY]: false };

void chrome.storage.local.set(optedLogout);

const verifier = generatePKCEVerifier();
const challenge = await generatePKCEChallenge(verifier);
Expand Down

0 comments on commit 00ba2c8

Please sign in to comment.