receiving refresh token

This commit is contained in:
talksik
2022-03-13 22:02:42 -04:00
parent 6e916b2faf
commit 6a8268eacb
5 changed files with 148 additions and 54 deletions
+18 -1
View File
@@ -2,7 +2,24 @@ const { contextBridge, ipcRenderer } = require("electron");
const { channels } = require("../src/shared/constants");
const API = {
activateLogin: () => ipcRenderer.send(channels.ACTIVATE_LOG_IN),
send: (channel, data) => {
// whitelist channels
// let validChannels = ["toMain"];
// if (validChannels.includes(channel)) {
// ipcRenderer.send(channel, data);
// }
ipcRenderer.send(channel, data);
},
receive: (channel, func) => {
// let validChannels = ["fromMain"];
// if (validChannels.includes(channel)) {
// // Deliberately strip event as it includes `sender`
// ipcRenderer.on(channel, (event, ...args) => func(...args));
// }
ipcRenderer.on(channel, (event, ...args) => func(...args));
},
};
contextBridge.exposeInMainWorld("API", API);