Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit c56499c

Browse files
Merge pull request #17 from wordpress-mobile/issue/sms-2fa-autofill
Login2FAViewController: Enabling iOS 12 OTP Autofill
2 parents 508ea18 + 162a728 commit c56499c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

WordPressAuthenticator/Signin/Login2FAViewController.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ class Login2FAViewController: LoginViewController, NUXKeyboardResponder, UITextF
103103
///
104104
@objc func configureTextFields() {
105105
verificationCodeField.contentInsets = WPStyleGuide.edgeInsetForLoginTextFields()
106+
107+
#if swift(>=4.2)
108+
if #available(iOS 12, *) {
109+
verificationCodeField.textContentType = .oneTimeCode
110+
}
111+
#endif
106112
}
107113

108114
/// Configures the appearance and state of the submit button.

0 commit comments

Comments
 (0)