1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

Wire up desktop -> browser communication. Add initial biometry support for browser integration

This commit is contained in:
Hinton
2020-10-11 20:41:10 +02:00
parent 45302e5bd5
commit c80b538674
5 changed files with 38 additions and 11 deletions

View File

@@ -15,6 +15,8 @@ class Proxy {
run() {
this.ipc.connect();
this.nativeMessage.listen();
this.ipc.onMessage = this.nativeMessage.send;
}
}

View File

@@ -7,6 +7,7 @@ ipc.config.logger = console.warn; // Stdout is used for native messaging
export default class IPC {
private connected = false;
public onMessage: (message: object) => void
connect() {
ipc.connectTo('bitwarden', () => {
@@ -24,8 +25,8 @@ export default class IPC {
console.error('disconnected from world');
});
ipc.of.bitwarden.on('message', (data: any) => {
console.error('got a message from world : ', data);
ipc.of.bitwarden.on('message', (message: any) => {
this.onMessage(message);
});
/*

View File

@@ -61,7 +61,6 @@ export default class NativeMessage {
flushChunksQueue();
const json = JSON.parse(contentWithoutSize);
console.error(json);
// Forward to desktop application
this.ipc.send(json);