DavBfr / flutter_u2f

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FIDO Universal 2nd Factor

This package supports NFC, USB and Webauthn Fido2 keys on iOS, Android, Windows, Linux, macOS, and Web.

Getting Started

Register

const u2f = U2fV2();
return await u2f.register(
  challenge: 'some random data',
  appId: 'example.com',
);

Authenticate

const u2f = U2fV2();
return await u2f.authenticate(
  challenge: 'some random data',
  appId: 'example.com',
  keyHandles: [
    // ... a list of registered key handles
  ],
);

Setup

Follow the flutter_nfc_kit package setup section.

On iOS, your new Info.plist lines should look like this:

<key>NFCReaderUsageDescription</key>
<string>Use NFC to authenticate with a security device</string>
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
  <string>A000000308</string>
  <string>A0000005272101</string>
  <string>A000000527471117</string>
  <string>A0000006472F0001</string>
</array>

About

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Dart 72.1%Language:C 26.3%Language:Ruby 0.7%Language:Makefile 0.5%Language:CMake 0.3%Language:Java 0.1%