yubikey_flutter 0.1.0
yubikey_flutter: ^0.1.0 copied to clipboard
Flutter plugin for YubiKey hardware authentication. Supports OTP, OATH TOTP/HOTP, FIDO2/WebAuthn and HMAC-SHA1 Challenge-Response over NFC, built on the official Yubico yubikit-android SDK.
Changelog #
0.1.0 #
Initial release.
Added #
- NFC discovery and connection stream (
onYubikeyConnected) exposingYubikeyDeviceInfo(device name, connection type, serial, firmware). isNfcSupported()/isNfcEnabled()runtime checks.- OTP:
readOtp({timeout})reads Yubico OTP via NDEF over NFC. - Challenge-Response:
challengeResponse({challenge, slot})performs HMAC-SHA1 on the YubiKey (slot 1 or 2). - OATH:
listOathCredentials(),calculateOathCode(id),calculateAllOathCodes()for TOTP/HOTP. - FIDO2 / WebAuthn:
fido2Register(...),fido2Authenticate(...),fido2Reset()via CTAP2. - Typed exception hierarchy:
YubikeyException,YubikeyNfcDisabledException,YubikeyNfcNotSupportedException,YubikeyTimeoutException,YubikeyCancelledException,YubikeyInvalidPinException(withretriesRemaining),YubikeyPinLockedException,YubikeyNoCredentialsException. - Android implementation built on the official yubikit-android SDK 2.7.0.
- Example app with OTP, OATH, and FIDO2 tabs.
- 26 unit tests.
Platforms #
- Android (minSdk 23, targetSdk 34).
- iOS on the roadmap.
