mcpField
I
ionic-biometric-auth

ionic-biometric-auth

github.com/erkamyamanSecurity1637 installsUpdated 1w ago
Repository

About ionic-biometric-auth

ionic-biometric-auth is a skill for integrating device biometrics into Ionic apps using `@aparajita/capacitor-biometric-auth`. It covers setup and safe usage, emphasizing that biometrics confirm local presence rather than authenticate a user to a backend.

Key features

  1. 01Setup guidance for the biometric authentication plugin
  2. 02Uses device Face ID, Touch ID, or fingerprint sensors
  3. 03Fallback guidance for passcode or password
  4. 04Guidance on app-lock routing and preferences
  5. 05Distinguishes local presence from backend sessions

Use cases

  1. 01Gate sensitive app features with a biometric prompt
  2. 02Lock app routes until local authentication succeeds
  3. 03Require renewed local proof after a session timeout

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/erkamyaman/ionic-capacitor-skills --skill ionic-biometric-auth

After installing, type/ionic-biometric-authin Claude Code to confirm it loaded.

Bundled filesreferences/setup-and-usage.md

Details

From the project README

Biometric Authentication

Use the device's biometric sensor (Face ID, Touch ID, fingerprint) to authenticate the user — for app lock, sensitive feature gating, or as a step-up after a session timeout.

When to consult

Hard rules

  • ✅ Biometrics authenticate the user to the device, not to your backend. Don't treat a successful biometric prompt as a backend session — it's a local proof of presence. Pair with a server-issued token / session.
  • ✅ For "app lock", store a flag in @capacitor/preferences and gate route navigation on it.
  • ✅ Provide a fallback to passcode / password when biometrics fail or are unavailable.
  • ❌ Don't use biometrics to "decrypt" stored secrets directly in this plugin — for true secure-enclave-backed key storage, use a secure-storage plugin backed by the iOS Keychain / Android Keystore (e.g. capacitor-secure-storage-plugin, or whichever community package is currently maintained — verify on npm before adopting).
  • ❌ Don't prompt for biometrics on every API call — that's both annoying and not what biometrics are for. Gate at app launch / on resume after a configurable timeout.

Library

npm install @aparajita/capacitor-biometric-auth
npx cap sync

Alternative plugins: @capgo/capacitor-native-biometric is also widely used. Pick one and stay consistent — they have similar APIs but different defaults.

Comments

Markdown supported