Doko's new lair
React Native YubiKey

What is this?

Yubikey SDK wrapper library for React Native, available for iOS and Android.

@doko/react-native-yubikit wraps Yubico's native YubiKit SDKs (YubiKit iOS and YubiKit Android) as a React Native TurboModule, so you can talk to a YubiKey from JS/TypeScript without writing any native code yourself.

The library is split into 8 independent native modules, exposed as namespaces from a single package:

import { Core, Support, Management, Oath, Piv, OpenPgp, YubiOtp, Fido } from '@doko/react-native-yubikit';

There is no YubiKeyReader class, no React hook shipped by the library, and no default export - everything is a plain exported function grouped by namespace, plus the types from src/types.ts re-exported at the top level.

Feature coverage

ModulePurposeiOSAndroid
CoreDevice discovery (USB + NFC), connection handling, raw APDUFullFull
SupportReading device info / friendly device nameFullFull
ManagementReading/writing device config, enabled capabilitiesPartial (setMode unavailable)Full
OathTOTP/HOTP credential managementFullFull
PivCertificates, key generation, sign/decrypt (PIV)Partial (no RSA3072/4096 raw sign/decrypt)Full
OpenPgpOpenPGP key/cert management, sign/decrypt/authNot availableFull
YubiOtpOTP slot programming, challenge-responsePartial (only calculateHmacSha1)Full
FidoFIDO2/WebAuthn registration & authenticationPartial (no credential management)Full

Android has full parity across every module. iOS is missing OpenPGP entirely, YubiOTP slot programming, and FIDO2 resident-credential management - these gaps come from the underlying YubiKit iOS SDK, not from this wrapper.

There is no classic FIDO U2F (CTAP1) API - only FIDO2/CTAP2 (Fido.makeCredential / Fido.getAssertion). There's also no QR-code scanning and no NFC static-OTP tag reading exposed on either platform.

Requirements at a glance

  • React Native 0.74+ with the New Architecture enabled (Fabric/TurboModules) - there is no old-bridge fallback
  • iOS 16.4+ recommended (USB-C smart card connections require iOS 16+; Lightning/accessory YubiKeys work on older iOS)
  • Android minSdkVersion 24

See Requirements for the full breakdown, and Installation for the real setup steps (including a required Podfile override for iOS).

Installation

npm install @doko/react-native-yubikit
# or
yarn add @doko/react-native-yubikit

Then follow Installation - iOS in particular needs a Podfile override, since the CocoaPods-trunk YubiKit pod is older than what this library requires.

On this page