lyokato / WebAuthnKit-iOS

WebAuthn iOS Library
MIT License
102 stars 30 forks source link

Getting WAKError when try to register #20

Open sridhardev07 opened 2 years ago

sridhardev07 commented 2 years ago

Hi, after implementation clicking on register show the create new key pop up but when I press create it throw the WAKError error 6 and error 8 sometime with error details as "The operation couldn't be completed". Can you tell the what these error number means or how to solve it??

wandersage commented 11 months ago

I got WAKError 6 when I mapped allowCredential to PublicKeyCredentialDescriptor array and assign it to option. Probably should use options.addAllowCredential.

  var options = PublicKeyCredentialRequestOptions()
 {NSArray from json}.map { (credentialId: Any) in
              if let credentialIdString = credentialId as? String {
                  options.addAllowCredential(
                      credentialId: base64ToByte(credentialIdString),
                      transports: [.internal_]
                  )
              }
          }