I am working on a small PoC on iCloud Key Chain Secure Login with Verification code after going through this video.
WWDC 2021 video, Secure Login with iCloud KeyChain
I am using my github account credentials to generate 2 facor authentication : Otpauth url which I am using is :
"apple-otpauth://totp/Github:MyGithubUserName?"+"secret=IssuerSecretKey&digits=6&period=30&issuer=github.com"
Steps which I am following :
-
Deleted 2 factor from my GitHub account on browser and deleted google authenticator app fro, iphone device.
-
Added my GitHub credentials in device settings - password app
-
In demo project, I have added one textfield and one button, textfield content type is .oneTimeCode and keyboard type as number pad.
-
Added above mentioned hardcoded GitHub otpauth url on button tap which navigates to password app and generate verification code.
Issue which I am facing is, Verification code is generated in device >> settings >> password section, but that verification code is not automatically get pasted in app textfield.
Quickbar is not enabled for the Textfield for verification code.
My UITextfield code is :
securityCodeTextField.textContentType = .oneTimeCode securityCodeTextField.autocorrectionType = .no
If I change textField to .userName then userName gets automatically filled in UITextfield.
Kindly help me what I am missing.