We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I'm getting folloing exception when trying to use this plugin.
Please help anyone
Exception: ] Error: node_modules/@capacitor/core/types/definitions-internal.d.ts:16:18 - error TS2430: Interface 'CapacitorInstance' incorrectly extends interface 'CapacitorGlobal'. [ng] Types of property 'Plugins' are incompatible. [ng] Property 'BiometricAuth' is missing in type '{ [pluginName: string]: { [prop: string]: any; }; }' but required in type 'PluginRegistry'. [ng] 16 export interface CapacitorInstance extends CapacitorGlobal { [ng] ~~~~~~~~~~~~~~~~~ [ng] node_modules/capacitor-biometric-auth/dist/esm/definitions.d.ts:3:9 [ng] 3 BiometricAuth: BiometricAuthPlugin; [ng] ~~~~~~~~~~~~~ [ng] 'BiometricAuth' is declared here.
Code:
import { BiometricAuth } from 'capacitor-biometric-auth';
@component({ selector: 'app-login', templateUrl: './login.page.html', styleUrls: ['./login.page.scss'], }) export class LoginPage extends BaseComponent implements OnInit { loginModel: LoginModel; loginForm = this.fb.group({ username: [, Validators.required], password: [, Validators.required] }); showFallback = true; password = '1234'; hasBiometricAuth = false; constructor( injector: Injector, private modalController: ModalController ) { super(injector); }
async ngOnInit() { const available = await BiometricAuth.isAvailable(); this.hasBiometricAuth = available.has; if (this.hasBiometricAuth) {
}
async openBiometricAuth() { const authResult = await BiometricAuth.verify({ reason: 'Your session has timed out', }); if (authResult.verified) { this.dismissLockScreen(); } }
dismissLockScreen() { this.modalController.dismiss({ reset: true }); }
unLock() { if (this.password === '1234') { this.dismissLockScreen(); } }
The text was updated successfully, but these errors were encountered:
I have the same issue, Still can't fix it?
Sorry, something went wrong.
No branches or pull requests
Hi, I'm getting folloing exception when trying to use this plugin.
Please help anyone
Exception:
] Error: node_modules/@capacitor/core/types/definitions-internal.d.ts:16:18 - error TS2430: Interface 'CapacitorInstance' incorrectly extends interface 'CapacitorGlobal'.
[ng] Types of property 'Plugins' are incompatible.
[ng] Property 'BiometricAuth' is missing in type '{ [pluginName: string]: { [prop: string]: any; }; }' but required in type 'PluginRegistry'.
[ng] 16 export interface CapacitorInstance extends CapacitorGlobal {
[ng] ~~~~~~~~~~~~~~~~~
[ng] node_modules/capacitor-biometric-auth/dist/esm/definitions.d.ts:3:9
[ng] 3 BiometricAuth: BiometricAuthPlugin;
[ng] ~~~~~~~~~~~~~
[ng] 'BiometricAuth' is declared here.
Code:
import { BiometricAuth } from 'capacitor-biometric-auth';
@component({
selector: 'app-login',
templateUrl: './login.page.html',
styleUrls: ['./login.page.scss'],
})
export class LoginPage extends BaseComponent implements OnInit {
loginModel: LoginModel;
loginForm = this.fb.group({
username: [, Validators.required],
password: [, Validators.required]
});
showFallback = true;
password = '1234';
hasBiometricAuth = false;
constructor(
injector: Injector,
private modalController: ModalController
) {
super(injector);
}
async ngOnInit() {
const available = await BiometricAuth.isAvailable();
this.hasBiometricAuth = available.has;
if (this.hasBiometricAuth) {
}
async openBiometricAuth() {
const authResult = await BiometricAuth.verify({
reason: 'Your session has timed out',
});
if (authResult.verified) {
this.dismissLockScreen();
}
}
dismissLockScreen() {
this.modalController.dismiss({ reset: true });
}
unLock() {
if (this.password === '1234') {
this.dismissLockScreen();
}
}
}
The text was updated successfully, but these errors were encountered: