fix: failed to load blobs in electron (#1927)

This commit is contained in:
Peng Xiao
2023-04-13 23:14:46 +08:00
committed by GitHub
parent 934e242116
commit 42756045bb
7 changed files with 27 additions and 32 deletions
+4 -2
View File
@@ -31,9 +31,11 @@ contextBridge.exposeInMainWorld('apis', {
ipcRenderer.invoke('ui:sidebar-visibility-change', visible),
/**
* Try sign in using Google and return a Google IDToken
* Try sign in using Google and return a request object to exchange the code for a token
* Not exchange in Node side because it is easier to do it in the renderer with VPN
*/
googleSignIn: (): Promise<string> => ipcRenderer.invoke('ui:google-sign-in'),
getGoogleOauthCode: (): Promise<{ requestInit: RequestInit; url: string }> =>
ipcRenderer.invoke('ui:get-google-oauth-code'),
/**
* Secret backdoor to update environment variables in main process