Skip to content

Conversation

@Xiaoshouzi-gh
Copy link
Contributor

Available swift test cases for passkey

@google-oss-bot
Copy link

1 Warning
⚠️ Did you forget to add a changelog entry? (Add #no-changelog to the PR description to silence this warning.)

Generated by 🚫 Danger

@Xiaoshouzi-gh Xiaoshouzi-gh requested a review from paulb777 March 29, 2024 22:15
Copy link
Member

@paulb777 paulb777 left a 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
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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
}
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@Xiaoshouzi-gh Xiaoshouzi-gh marked this pull request as ready for review April 2, 2024 18:17
Copy link
Member

@paulb777 paulb777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@Xiaoshouzi-gh Xiaoshouzi-gh merged commit 111f275 into passkey Apr 2, 2024
@Xiaoshouzi-gh Xiaoshouzi-gh deleted the passkey-swift branch April 2, 2024 20:12
@firebase firebase locked and limited conversation to collaborators May 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants