forked from VinCSS-Public-Projects/FIDO2Client
-
Notifications
You must be signed in to change notification settings - Fork 1
/
proxy.js
24 lines (24 loc) · 1003 Bytes
/
proxy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
navigator.credentials.create = (publicCreateOptions) => {
return ipcRenderer.invoke('navigator.credentials.create', publicCreateOptions).then((x) => {
x.getClientExtensionResults = () => {
return {}
};
x.rawId = x.rawId?.buffer;
x.response.clientDataJSON = x.response.clientDataJSON?.buffer;
x.response.attestationObject = x.response.attestationObject?.buffer;
return x;
});
};
navigator.credentials.get = (publicGetOptions) => {
return ipcRenderer.invoke('navigator.credentials.get', publicGetOptions).then((x) => {
x.getClientExtensionResults = () => {
return {}
};
x.rawId = x.rawId?.buffer;
x.response.clientDataJSON = x.response.clientDataJSON?.buffer;
x.response.authenticatorData = x.response.authenticatorData?.buffer;
x.response.signature = x.response.signature?.buffer;
x.response.userHandle = x.response.userHandle?.buffer;
return x;
});
};