diff --git a/src/lib/desktop.ts b/src/lib/desktop.ts index d802e1e43..7b7503c59 100644 --- a/src/lib/desktop.ts +++ b/src/lib/desktop.ts @@ -697,7 +697,7 @@ export const readTokenFile = async () => { export const writeTokenFile = async (token: string) => { const tokenFilePath = await getTokenFilePath() if (err(token)) return Promise.reject(token) - const result = window.electron.writeFile(tokenFilePath, token) + const result = window.electron.writeFile(tokenFilePath, token) console.warn(`token written to disk`) return result } diff --git a/src/machines/authMachine.ts b/src/machines/authMachine.ts index 11fbf966a..05687290d 100644 --- a/src/machines/authMachine.ts +++ b/src/machines/authMachine.ts @@ -1,8 +1,5 @@ import type { Models } from '@kittycad/lib' -import { - VITE_KC_API_BASE_URL, - VITE_KC_DEV_TOKEN, -} from '@src/env' +import { VITE_KC_API_BASE_URL, VITE_KC_DEV_TOKEN } from '@src/env' import { assign, fromPromise, setup } from 'xstate' import { COOKIE_NAME, OAUTH2_DEVICE_CLIENT_ID } from '@src/lib/constants' @@ -19,7 +16,6 @@ import { } from '@src/lib/withBaseURL' import { ACTOR_IDS } from '@src/machines/machineConstants' - const LOCAL_USER: Models['User_type'] = { id: '8675309', name: 'Test User', @@ -54,9 +50,7 @@ export type Events = export const TOKEN_PERSIST_KEY = 'TOKEN_PERSIST_KEY' export const persistedToken = - getCookie(COOKIE_NAME) || - localStorage?.getItem(TOKEN_PERSIST_KEY) || - '' + getCookie(COOKIE_NAME) || localStorage?.getItem(TOKEN_PERSIST_KEY) || '' export const authMachine = setup({ types: {} as { context: UserContext @@ -223,7 +217,9 @@ async function getAndSyncStoredToken(input: { token?: string }): Promise { if (VITE_KC_DEV_TOKEN) { - console.warn(`Authentication skipped, VITE_KC_DEV_TOKEN:${!!VITE_KC_DEV_TOKEN ? '' : 'Oh no, this should not be missing.'}`) + console.warn( + `Authentication skipped, VITE_KC_DEV_TOKEN:${!!VITE_KC_DEV_TOKEN ? '' : 'Oh no, this should not be missing.'}` + ) return VITE_KC_DEV_TOKEN }