Make the client more secure (#3742)

Co-authored-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Michael Neale <michael.neale@gmail.com>
This commit is contained in:
Douwe Osinga
2025-07-31 19:20:37 +02:00
committed by GitHub
parent d9313aca57
commit d1e38fba32
19 changed files with 89 additions and 104 deletions
@@ -1,5 +1,5 @@
import { ExtensionConfig } from '../../../api/types.gen';
import { getApiUrl, getSecretKey } from '../../../config';
import { getApiUrl } from '../../../config';
import { toastService, ToastServiceOptions } from '../../../toasts';
import { replaceWithShims } from './utils';
@@ -46,7 +46,7 @@ export async function extensionApiCall(
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Secret-Key': getSecretKey(),
'X-Secret-Key': await window.electron.getSecretKey(),
},
body: JSON.stringify(payload),
});