Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@phemium-costaisa/fingerprint-auth
Advanced tools
Automatic plugin to work with FaceID and TouchID authentication
Package of component, pipe and service to handle Fingerprint authentication on Angular apps.
Run npm i -S @phemium-costaisa/fingerprint-auth
FingerprintAuthModule.forRoot()
to app.module.ts:import { FingerprintAuthModule } from 'fingerprint-auth';
@NgModule({
imports: [
FingerprintAuthModule.forRoot({
mobile: environment.platform === 'mobile'
})
]
})
export class AppModule {}
FingerprintAuthModule.forChild()
where the biometricLoginActive
needs to be used:import { FingerprintAuthModule } from 'fingerprint-auth';
@NgModule({
imports: [
FingerprintAuthModule.forChild()
]
})
export class LoginMobilePageModule {}
To use the <app-biometric-activador>
just import the BiometricActivator
component in the module you need it.
But, if you need to make it as routing page, you must create a Wrapper module for it, like this:
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { BiometricActivator } from 'fingerprint-auth';
const routes: Routes = [
{
path: '',
component: BiometricActivator
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class BiometricActivatorPageRoutingModule {}
Just import the FingerprintService
wherever you need it:
import { FingerprintService } from 'fingerprint-auth';
@Component()
export class MyComponent {
constructor(
private fingerprintService: FingerprintService
) { }
}
The FingerprintService is well documented in-code, but I'll give a few examples:
if (await this.fingerprintService.checkIfNeedsBiometric(email)) {
this.fingerprintService.showBiometricActivator(email, password, 'dashboard');
}
this.fingerprintService.showBiometricPrompt(user).then(result => {
this.login(result.user, result.password, true);
});
biometricFace = new FormControl(false);
biometricTouch = new FormControl(false);
ngOnInit() {
this.fingerprintService.isBiometricActive(this.userService.user.email, 'face').then(active => this.biometricFace.setValue(active, { emitEvent: false }));
this.fingerprintService.isBiometricActive(this.userService.user.email, 'touch').then(active => this.biometricTouch.setValue(active, { emitEvent: false }));
this.fingerprintService.retrieveDeviceBiometrics().then(biometrics => {
if (biometrics.face || biometrics.touch) {
this.showBiometric = true;
}
})
}
this.biometricFace.valueChanges.subscribe(enable => this.biometricChange('face', enable));
this.biometricTouch.valueChanges.subscribe(enable => this.biometricChange('touch', enable));
}
async biometricChange(biometricType: keyof BiometricsAvailable, enabled: boolean) {
if (enabled) {
await this.fingerprintService.clearBiometricData(this.userService.user.email, biometricType);
} else {
await this.fingerprintService.disableBiometricData(this.userService.user.email, biometricType);
}
}
FAQs
Automatic plugin to work with FaceID and TouchID authentication
We found that @phemium-costaisa/fingerprint-auth demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.