-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Passkey swift tests #12663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passkey swift tests #12663
Conversation
Generated by 🚫 Danger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed by looking at the Public header changes in main...passkey
| } | ||
| #endif | ||
| if #available(iOS 15.0, macOS 12.0, tvOS 16.0, *) { | ||
| auth.startPasskeySignIn { result, error in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add finalizePasskeySignIn as well here and below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the data type of input for finalizePasskeySignIn is ASAuthorizationPlatformPublicKeyCredentialAssertion which I did not find an initializer. Can you suggest? finalizePasskeyEnrollment is a similar story.
How this is passed to us/customers is thru a platform delegation. How did we test this with Obj-c is to mock the class and to mock the behavior when trying to access the property of the instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could pass in the ASAuthorizationPlatformPublicKeyCredentialAssertion as a parameter to the test function, since this is a build-only test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Paul. I used the with NSCoder instead, please take a look.
| #endif | ||
| if #available(iOS 15.0, macOS 12.0, tvOS 16.0, *) { | ||
| user.startPasskeyEnrollment(with: "token") { _, _ in | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
finalize variation as well for the User API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
Available swift test cases for passkey