Skip to content
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 #5] Auth startPasskeySignInWithCompletion: and finalizePasskeySignInWithPlatformCredential:completion #11952

Merged
merged 9 commits into from
Oct 23, 2023

Conversation

Xiaoshouzi-gh
Copy link
Contributor

Added public APIs on FIRAuth level

  • startPasskeySignInWithCompletion:
  • finalizePasskeySignInWithPlatformCredential:completion:
  • Added unit tests
  • Added auth base64url utility methods to NSData.

TODO occurrences

  1. finalizePasskeySignIn test cases will pass after we introduce the expires_in field.
  2. Error codes will be added in a different CR.

…eySignInWithPlatformCredential:completion APIs
@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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2023

Apple API Diff Report

Commit: b03c13f
Last updated: Mon Oct 23 09:30 PDT 2023
View workflow logs & download artifacts


FirebaseAuth

Classes

FIRAuth
[ADDED] -startPasskeySignInWithCompletion:
Swift:
+  func startPasskeySignIn () async throws -> ASAuthorizationPlatformPublicKeyCredentialAssertionRequest
Objective-C:
+  - ( void ) startPasskeySignInWithCompletion : ( nullable void ( ^ )( ASAuthorizationPlatformPublicKeyCredentialAssertionRequest * _Nullable , NSError * _Nullable )) completion ;
[ADDED] -finalizePasskeySignInWithPlatformCredential:completion:
Swift:
+  func finalizePasskeySignIn ( with platformCredential : ASAuthorizationPlatformPublicKeyCredentialAssertion ) async throws -> FIRAuthDataResult
Objective-C:
+  - ( void ) finalizePasskeySignInWithPlatformCredential : ( nonnull ASAuthorizationPlatformPublicKeyCredentialAssertion * ) platformCredential completion : ( nullable void ( ^ )( FIRAuthDataResult * _Nullable , NSError * _Nullable )) completion ;

@Xiaoshouzi-gh Xiaoshouzi-gh marked this pull request as ready for review October 23, 2023 14:31
@brief start sign in with passkey retrieving challenge from GCIP and create an assertion request.
@param completion Optionally; a block which creates a assertation request.

@remarks //TODO add possible error codes
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this mean? Also add your ldap after TODO.

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 ldap.

The reason for this is to follow the current public API reference format which includes a list of possible error codes. Please see an example here. I will fill this after error code bug (b/302700496) for backend is fixed.

}
}

// TODO @liubin uncomment this after expires_in changes
Copy link
Contributor

Choose a reason for hiding this comment

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

We can include this in a future pr

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it, removed for now. Will add it back with the "expires_in" fix PR.

@Xiaoshouzi-gh Xiaoshouzi-gh merged commit 076d2e4 into passkey-main Oct 23, 2023
45 checks passed
@Xiaoshouzi-gh Xiaoshouzi-gh deleted the passkey-user branch October 23, 2023 16:44
@firebase firebase locked and limited conversation to collaborators Nov 23, 2023
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