-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create NoopBiometricsService instead of method guards
- Loading branch information
Showing
2 changed files
with
43 additions
and
6 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
apps/desktop/src/platform/main/biometric/biometric.noop.main.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { OsBiometricService } from "./biometrics.service.abstraction"; | ||
|
||
export default class NoopBiometricsService implements OsBiometricService { | ||
constructor() {} | ||
|
||
async init() {} | ||
|
||
async osSupportsBiometric(): Promise<boolean> { | ||
return false; | ||
} | ||
|
||
async getBiometricKey( | ||
service: string, | ||
storageKey: string, | ||
clientKeyHalfB64: string, | ||
): Promise<string | null> { | ||
return null; | ||
} | ||
|
||
async setBiometricKey( | ||
service: string, | ||
storageKey: string, | ||
value: string, | ||
clientKeyPartB64: string | undefined, | ||
): Promise<void> { | ||
return; | ||
} | ||
|
||
async deleteBiometricKey(service: string, key: string): Promise<void> {} | ||
|
||
async authenticateBiometric(): Promise<boolean> { | ||
throw new Error("Not supported on this platform"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters