Getting Started on iOS

Applicable Products


Depending on the iOS hardware platform, there are two methods for using a YubiKey with iOS. The YubiKey 5Ci can connect directly to an iOS device via a Lightning or USB-C connector, while the YubiKey NFC allows for OTP communication over NFC. The Yubico Mobile iOS SDK is required to enable the YubiKey to interact with iOS apps beyond sending touch-triggered OTPs.

Using Your YubiKey 5Ci on iOS

The YubiKey 5Ci allows for the direct connection to an iOS device. While connected via Lightning, the entire functionality of the YubiKey can be accessed via the Yubico Mobile iOS SDK. However, when connected via USB-C, the support for the YubiKey 5Ci is limited to the touch triggered OTPs.

Applications leveraging the Yubico Mobile iOS SDK will automatically handle the authentication with the YubiKey, prompting the user to touch or enter a PIN if required. 

When using the YubiKey as an touch-triggered OTP device, the experience on iOS is very similar to using it on your desktop or laptop computer. After connecting the YubiKey to your device, you can short press (1 second) or long press (3+ seconds) to activate the credential in slot 1 and slot 2 on the YubiKey respectively.

Testing the YubiKey 5Ci on iOS

If you would like to test your YubiKey on iOS, you can use the steps below.

  1. Connect your YubiKey to your iOS device via the Lightning or USB-C connector.
  2. Wait until the green light in the touch button is blinking, indicating the iOS device has detected the YubiKey.
  3. If a dialog box appears with the message “The connected device is not supported” the first time the YubiKey is plugged into your device, simply click OK to exit the dialog box.
  4. Open Safari and browse to
  5. Click in the YubiKey field.
  6. Touch the metal contact on your YubiKey. The YubiKey will type the OTP and send it to the server.
  7. Verify it succeeds with the “You have been successfully authenticated!” message.

Note: If the One-Time Password verification fails and begins with a capital letter, check to be sure you have turned off auto-capitalization in the iOS preferences. This setting is turned on by default. To turn it off, go to Settings > General > Keyboards, and slide the setting to turn off Auto-Capitalization.

Using Your YubiKey NFC on iOS

The YubiKey NFC allows for passing OTP codes via NFC on the iPhone 7 and above. The Yubico Mobile iOS SDK is required for an application to capture and parse the NFC data. To use the YubiKey NFC for authentication, follow the steps below.

Testing the YubiKey NFC on iOS

If you have an iPhone that supports background tag reading (iPhone XS and later) and would like to test your NFC-enabled YubiKey on iOS, follow the steps below.

  1. Ensure NFC communication is supported on your iPhone.
  2. Open Safari browser.
  3. Tap and hold the YubiKey NFC key to the back of your phone (upper left).
  4. Follow the prompt to the URL from the tapped NFC tag.
  5. You should see your Yubico OTP code pasted into the field. Tap VALIDATE.
  6. The OTP code is passed to the YubiCloud OTP validation server. Verify "Validation Successful".

You may need to move your YubiKey on your iPhone to find the best location for the NFC communication to occur.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.