Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: syntax error being thrown in Firefox for anonymous objects with computed property names #241

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading