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 on iOS
If you would like to test your YubiKey on iOS, you can use the steps below.
- Connect your YubiKey to your iOS device via the Lightning or USB-C connector.
- Wait until the green light in the touch button is blinking, indicating the iOS device has detected the YubiKey.
- 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.
- Open Safari and browse to https://demo.yubico.com/.
- Click in the YubiKey field.
- Touch the metal contact on your YubiKey. The YubiKey will type the OTP and send it to the server.
- 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 5Ci 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.
- Ensure NFC communication is supported enabled on your iPhone.
- Open the App supporting the YubiKey NFC.
- Proceed until the App prompts the user to tap the YubiKey to their iOS device.
- Tap and hold the YubiKey flat to the back of your iPhone device until the app prompts that the authentication succeeded.
You may need to move your YubiKey on your iPhone to find the best location for the NFC communication to occur.