15 lines
526 B
TypeScript
15 lines
526 B
TypeScript
import { contextBridge, ipcRenderer } from 'electron';
|
|
|
|
contextBridge.exposeInMainWorld( 'electronAuth', {
|
|
login: ( email: string, password: string, remember: boolean ) =>
|
|
ipcRenderer.invoke( 'auth:login', email, password, remember ),
|
|
loginSuccess: () =>
|
|
ipcRenderer.send( 'auth:login-success' ),
|
|
lastEmail: () =>
|
|
ipcRenderer.invoke( 'auth:last-email' ),
|
|
lastPassword: () =>
|
|
ipcRenderer.invoke( 'auth:last-password' ),
|
|
clearCredentials: () =>
|
|
ipcRenderer.invoke( 'auth:clear-credentials' ),
|
|
} );
|