From d2c8abeae144d76a636bb6094b50138f043902a4 Mon Sep 17 00:00:00 2001 From: Liubin Jiang Date: Wed, 23 Aug 2023 15:40:47 -0700 Subject: [PATCH] update AS imports --- FirebaseAuth/Sources/Auth/FIRAuth.m | 18 ++++++++++--- .../Sources/Public/FirebaseAuth/FIRAuth.h | 5 +--- .../Sources/Public/FirebaseAuth/FIRUser.h | 5 ---- FirebaseAuth/Sources/User/FIRUser.m | 27 +++++++++++++++++++ 4 files changed, 42 insertions(+), 13 deletions(-) diff --git a/FirebaseAuth/Sources/Auth/FIRAuth.m b/FirebaseAuth/Sources/Auth/FIRAuth.m index 13cbd142a01..76a21352b4e 100644 --- a/FirebaseAuth/Sources/Auth/FIRAuth.m +++ b/FirebaseAuth/Sources/Auth/FIRAuth.m @@ -18,8 +18,6 @@ #import "FirebaseAuth/Sources/Auth/FIRAuth_Internal.h" - - #if __has_include() #import #endif @@ -84,6 +82,11 @@ #import "FirebaseAuth/Sources/Utilities/FIRAuthURLPresenter.h" #endif +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX || TARGET_OS_MACCATALYST +@class ASAuthorizationPlatformPublicKeyCredentialAssertion; +@class ASAuthorizationPlatformPublicKeyCredentialAssertionRequest; +#endif + NS_ASSUME_NONNULL_BEGIN #pragma mark-- Logger Service String. @@ -2371,10 +2374,17 @@ - (nullable FIRUser *)getStoredUserForAccessGroup:(NSString *_Nullable)accessGro return user; } -- (void)startPasskeySignInWithCompletion:(nullable void (^)(ASAuthorizationPlatformPublicKeyCredentialAssertionRequest * _Nullable __strong, NSError * _Nullable error))completion{ +- (void)startPasskeySignInWithCompletion: + (nullable void (^)( + ASAuthorizationPlatformPublicKeyCredentialAssertionRequest *_Nullable request, + NSError *_Nullable error))completion { } -- (void)finalizePasskeySignInWithPlatformCredential:(ASAuthorizationPlatformPublicKeyCredentialAssertion *)platformCredential completion:(nullable void (^)(FIRAuthDataResult * _Nullable __strong, NSError * _Nullable __strong))completion{ +- (void)finalizePasskeySignInWithPlatformCredential: + (ASAuthorizationPlatformPublicKeyCredentialAssertion *)platformCredential + completion:(nullable void (^)( + FIRAuthDataResult *_Nullable result, + NSError *_Nullable error))completion { } @end diff --git a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuth.h b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuth.h index b2d18d2725b..3b876e41dc6 100644 --- a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuth.h +++ b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuth.h @@ -29,10 +29,7 @@ @class FIRUser; @protocol FIRAuthUIDelegate; @protocol FIRFederatedAuthProvider; -#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX || TARGET_OS_MACCATALYST -@class ASAuthorizationPlatformPublicKeyCredentialAssertion; -@class ASAuthorizationPlatformPublicKeyCredentialAssertionRequest; -#endif + NS_ASSUME_NONNULL_BEGIN /** @typedef FIRUserUpdateCallback diff --git a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRUser.h b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRUser.h index 35dd99e2cce..41db23d9057 100644 --- a/FirebaseAuth/Sources/Public/FirebaseAuth/FIRUser.h +++ b/FirebaseAuth/Sources/Public/FirebaseAuth/FIRUser.h @@ -28,11 +28,6 @@ @class FIRUserMetadata; @protocol FIRAuthUIDelegate; -#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX || TARGET_OS_MACCATALYST -@class ASAuthorizationPlatformPublicKeyCredentialRegistration; -@class ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest; -#endif - NS_ASSUME_NONNULL_BEGIN /** @typedef FIRAuthTokenCallback diff --git a/FirebaseAuth/Sources/User/FIRUser.m b/FirebaseAuth/Sources/User/FIRUser.m index a8e91c0a537..13b236e90a4 100644 --- a/FirebaseAuth/Sources/User/FIRUser.m +++ b/FirebaseAuth/Sources/User/FIRUser.m @@ -66,6 +66,11 @@ #import "FirebaseAuth/Sources/AuthProvider/Phone/FIRPhoneAuthCredential_Internal.h" #endif +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX || TARGET_OS_MACCATALYST +@class ASAuthorizationPlatformPublicKeyCredentialRegistration; +@class ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest; +#endif + NS_ASSUME_NONNULL_BEGIN /** @var kUserIDCodingKey @@ -1517,6 +1522,28 @@ - (void)signOutIfTokenIsInvalidWithError:(nullable NSError *)error { } } +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_OSX || TARGET_OS_MACCATALYST +- (void)finalizePasskeyEnrollmentWithPlatformCredential: + (nonnull ASAuthorizationPlatformPublicKeyCredentialRegistration *)platformCredential + completion:(nullable void (^)( + FIRAuthDataResult *_Nullable result, + NSError *_Nullable error))completion { +} + +- (void)startPasskeyEnrollmentWithName:(nullable NSString *)name + completion: + (nullable void (^)( + ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest + *_Nullable request, + NSError *_Nullable error))completion { +} + +#endif + +- (void)unenrollPasskeyWithCredentialID:(nonnull NSString *)credentialID + completion:(nullable void (^)(NSError *_Nullable error))completion { +} + @end @implementation FIRUserProfileChangeRequest {