| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602 |
- // Copyright 2023 Google LLC
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
- #import <XCTest/XCTest.h>
- @import FirebaseCore;
- @import FirebaseAuth;
- #if !TARGET_OS_OSX && !TARGET_OS_WATCH
- @interface AuthUIImpl : NSObject <FIRAuthUIDelegate>
- - (void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^_Nullable)(void))completion;
- - (void)presentViewController:(nonnull UIViewController *)viewControllerToPresent
- animated:(BOOL)flag
- completion:(void (^_Nullable)(void))completion;
- @end
- @implementation AuthUIImpl
- - (void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^_Nullable)(void))completion {
- }
- - (void)presentViewController:(nonnull UIViewController *)viewControllerToPresent
- animated:(BOOL)flag
- completion:(void (^_Nullable)(void))completion {
- }
- @end
- #endif
- #if TARGET_OS_IOS
- @interface FederatedAuthImplementation : NSObject <FIRFederatedAuthProvider>
- - (void)getCredentialWithUIDelegate:(nullable id<FIRAuthUIDelegate>)UIDelegate
- completion:(nullable void (^)(FIRAuthCredential *_Nullable,
- NSError *_Nullable))completion;
- @end
- @implementation FederatedAuthImplementation
- - (void)getCredentialWithUIDelegate:(nullable id<FIRAuthUIDelegate>)UIDelegate
- completion:(nullable void (^)(FIRAuthCredential *_Nullable,
- NSError *_Nullable))completion {
- }
- @end
- #endif
- @interface ObjCAPICoverage : XCTestCase
- @end
- @implementation ObjCAPICoverage
- - (void)FIRActionCodeSettings_h {
- FIRActionCodeSettings *codeSettings = [[FIRActionCodeSettings alloc] init];
- [codeSettings setIOSBundleID:@"abc"];
- [codeSettings setAndroidPackageName:@"name" installIfNotAvailable:NO minimumVersion:@"1.1"];
- BOOL b = [codeSettings handleCodeInApp];
- b = [codeSettings androidInstallIfNotAvailable];
- __unused NSURL *u = [codeSettings URL];
- NSString *s = [codeSettings iOSBundleID];
- s = [codeSettings androidPackageName];
- s = [codeSettings androidMinimumVersion];
- s = [codeSettings dynamicLinkDomain];
- }
- - (void)FIRAuthAdditionalUserInfo_h:(FIRAdditionalUserInfo *)additionalUserInfo {
- NSString *s = [additionalUserInfo providerID];
- __unused BOOL b = [additionalUserInfo isNewUser];
- __unused NSDictionary<NSString *, NSObject *> *dict = [additionalUserInfo profile];
- s = [additionalUserInfo username];
- }
- - (void)ActionCodeOperationTests:(FIRActionCodeInfo *)info {
- __unused FIRActionCodeOperation op = [info operation];
- NSString *s = [info email];
- s = [info previousEmail];
- }
- - (void)ActionCodeURL:(FIRActionCodeURL *)url {
- __unused FIRActionCodeOperation op = [url operation];
- NSString *s = [url APIKey];
- s = [url code];
- __unused NSURL *u = [url continueURL];
- s = [url languageCode];
- }
- - (void)authProperties:(FIRAuth *)auth {
- __unused BOOL b = [auth shareAuthStateAcrossDevices];
- [auth setShareAuthStateAcrossDevices:YES];
- __unused FIRUser *u = [auth currentUser];
- NSString *s = [auth languageCode];
- [auth setLanguageCode:s];
- FIRAuthSettings *settings = [auth settings];
- [auth setSettings:settings];
- s = [auth userAccessGroup];
- s = [auth tenantID];
- [auth setTenantID:s];
- s = [auth customAuthDomain];
- [auth setCustomAuthDomain:s];
- #if TARGET_OS_IOS
- __unused NSData *d = [auth APNSToken];
- // TODO: It seems like a no-op and a bug to have this API in Objective-C
- // auth.APNSToken = [[NSData alloc] init];
- #endif
- }
- - (void)FIRAuth_h:(FIRAuth *)auth
- with:(FIRAuthCredential *)credential
- provider:(FIROAuthProvider *)provider
- url:(NSURL *)url {
- [auth updateCurrentUser:[auth currentUser]
- completion:^(NSError *_Nullable error){
- }];
- [auth signInWithEmail:@"a@abc.com"
- password:@"pw"
- completion:^(FIRAuthDataResult *_Nullable authResult, NSError *_Nullable error){
- }];
- #if !TARGET_OS_WATCH
- [auth signInWithEmail:@"a@abc.com"
- link:@"link"
- completion:^(FIRAuthDataResult *_Nullable authResult, NSError *_Nullable error){
- }];
- #endif
- #if TARGET_OS_IOS
- [auth signInWithProvider:provider
- UIDelegate:nil
- completion:^(FIRAuthDataResult *_Nullable authResult, NSError *_Nullable error){
- }];
- [auth signInWithCredential:credential
- completion:^(FIRAuthDataResult *_Nullable authResult, NSError *_Nullable error){
- }];
- #endif
- [auth signInAnonymouslyWithCompletion:^(FIRAuthDataResult *_Nullable authResult,
- NSError *_Nullable error){
- }];
- [auth signInWithCustomToken:@"token"
- completion:^(FIRAuthDataResult *_Nullable authResult, NSError *_Nullable error){
- }];
- [auth createUserWithEmail:@"a@abc.com"
- password:@"pw"
- completion:^(FIRAuthDataResult *_Nullable authResult, NSError *_Nullable error){
- }];
- [auth confirmPasswordResetWithCode:@"code"
- newPassword:@"pw"
- completion:^(NSError *_Nullable error){
- }];
- [auth checkActionCode:@"code"
- completion:^(FIRActionCodeInfo *_Nullable info, NSError *_Nullable error){
- }];
- [auth verifyPasswordResetCode:@"code"
- completion:^(NSString *_Nullable email, NSError *_Nullable error){
- }];
- [auth applyActionCode:@"code"
- completion:^(NSError *_Nullable error){
- }];
- [auth sendPasswordResetWithEmail:@"email"
- completion:^(NSError *_Nullable error){
- }];
- FIRActionCodeSettings *settings = [[FIRActionCodeSettings alloc] init];
- [auth sendPasswordResetWithEmail:@"email"
- actionCodeSettings:settings
- completion:^(NSError *_Nullable error){
- }];
- #if !TARGET_OS_WATCH
- [auth sendSignInLinkToEmail:@"email"
- actionCodeSettings:settings
- completion:^(NSError *_Nullable error){
- }];
- #endif
- NSError *error;
- [auth signOut:&error];
- __unused BOOL b;
- #if !TARGET_OS_WATCH
- b = [auth isSignInWithEmailLink:@"email"];
- #endif
- FIRAuthStateDidChangeListenerHandle handle =
- [auth addAuthStateDidChangeListener:^(FIRAuth *_Nonnull auth, FIRUser *_Nullable user){
- }];
- [auth removeAuthStateDidChangeListener:handle];
- [auth removeIDTokenDidChangeListener:handle];
- [auth useAppLanguage];
- [auth useEmulatorWithHost:@"host" port:123];
- #if TARGET_OS_IOS
- b = [auth canHandleURL:url];
- [auth setAPNSToken:[[NSData alloc] init] type:FIRAuthAPNSTokenTypeProd];
- b = [auth canHandleNotification:@{}];
- #if !TARGET_OS_MACCATALYST && (!defined(TARGET_OS_VISION) || !TARGET_OS_VISION)
- [auth initializeRecaptchaConfigWithCompletion:^(NSError *_Nullable error){
- }];
- #endif
- #endif
- [auth revokeTokenWithAuthorizationCode:@"a"
- completion:^(NSError *_Nullable error){
- }];
- [auth useUserAccessGroup:@"abc" error:&error];
- __unused FIRUser *u = [auth getStoredUserForAccessGroup:@"user" error:&error];
- }
- #if !TARGET_OS_OSX
- - (void)FIRAuthAPNSTokenType_h {
- FIRAuthAPNSTokenType t = FIRAuthAPNSTokenTypeProd;
- t = FIRAuthAPNSTokenTypeSandbox;
- t = FIRAuthAPNSTokenTypeUnknown;
- }
- #endif
- - (NSString *)authCredential:(FIRAuthCredential *)credential {
- return [credential provider];
- }
- - (void)authDataResult:(FIRAuthDataResult *)result {
- __unused FIRUser *u = [result user];
- __unused FIRAdditionalUserInfo *info = [result additionalUserInfo];
- __unused FIRAuthCredential *c = [result credential];
- }
- - (void)FIRAuthErrors_h {
- FIRAuthErrorCode c = FIRAuthErrorCodeInvalidCustomToken;
- c = FIRAuthErrorCodeCustomTokenMismatch;
- c = FIRAuthErrorCodeInvalidCredential;
- c = FIRAuthErrorCodeUserDisabled;
- c = FIRAuthErrorCodeOperationNotAllowed;
- c = FIRAuthErrorCodeEmailAlreadyInUse;
- c = FIRAuthErrorCodeInvalidEmail;
- c = FIRAuthErrorCodeWrongPassword;
- c = FIRAuthErrorCodeTooManyRequests;
- c = FIRAuthErrorCodeUserNotFound;
- c = FIRAuthErrorCodeAccountExistsWithDifferentCredential;
- c = FIRAuthErrorCodeRequiresRecentLogin;
- c = FIRAuthErrorCodeProviderAlreadyLinked;
- c = FIRAuthErrorCodeNoSuchProvider;
- c = FIRAuthErrorCodeInvalidUserToken;
- c = FIRAuthErrorCodeNetworkError;
- c = FIRAuthErrorCodeUserTokenExpired;
- c = FIRAuthErrorCodeInvalidAPIKey;
- c = FIRAuthErrorCodeUserMismatch;
- c = FIRAuthErrorCodeCredentialAlreadyInUse;
- c = FIRAuthErrorCodeWeakPassword;
- c = FIRAuthErrorCodeAppNotAuthorized;
- c = FIRAuthErrorCodeExpiredActionCode;
- c = FIRAuthErrorCodeInvalidActionCode;
- c = FIRAuthErrorCodeInvalidMessagePayload;
- c = FIRAuthErrorCodeInvalidSender;
- c = FIRAuthErrorCodeInvalidRecipientEmail;
- c = FIRAuthErrorCodeMissingEmail;
- c = FIRAuthErrorCodeMissingIosBundleID;
- c = FIRAuthErrorCodeMissingAndroidPackageName;
- c = FIRAuthErrorCodeUnauthorizedDomain;
- c = FIRAuthErrorCodeInvalidContinueURI;
- c = FIRAuthErrorCodeMissingContinueURI;
- c = FIRAuthErrorCodeMissingPhoneNumber;
- c = FIRAuthErrorCodeInvalidPhoneNumber;
- c = FIRAuthErrorCodeMissingVerificationCode;
- c = FIRAuthErrorCodeInvalidVerificationCode;
- c = FIRAuthErrorCodeMissingVerificationID;
- c = FIRAuthErrorCodeInvalidVerificationID;
- c = FIRAuthErrorCodeMissingAppCredential;
- c = FIRAuthErrorCodeInvalidAppCredential;
- c = FIRAuthErrorCodeSessionExpired;
- c = FIRAuthErrorCodeQuotaExceeded;
- c = FIRAuthErrorCodeMissingAppToken;
- c = FIRAuthErrorCodeNotificationNotForwarded;
- c = FIRAuthErrorCodeAppNotVerified;
- c = FIRAuthErrorCodeCaptchaCheckFailed;
- c = FIRAuthErrorCodeWebContextAlreadyPresented;
- c = FIRAuthErrorCodeWebContextCancelled;
- c = FIRAuthErrorCodeAppVerificationUserInteractionFailure;
- c = FIRAuthErrorCodeInvalidClientID;
- c = FIRAuthErrorCodeWebNetworkRequestFailed;
- c = FIRAuthErrorCodeWebInternalError;
- c = FIRAuthErrorCodeWebSignInUserInteractionFailure;
- c = FIRAuthErrorCodeLocalPlayerNotAuthenticated;
- c = FIRAuthErrorCodeNullUser;
- c = FIRAuthErrorCodeDynamicLinkNotActivated;
- c = FIRAuthErrorCodeInvalidProviderID;
- c = FIRAuthErrorCodeTenantIDMismatch;
- c = FIRAuthErrorCodeUnsupportedTenantOperation;
- c = FIRAuthErrorCodeInvalidDynamicLinkDomain;
- c = FIRAuthErrorCodeRejectedCredential;
- c = FIRAuthErrorCodeGameKitNotLinked;
- c = FIRAuthErrorCodeSecondFactorRequired;
- c = FIRAuthErrorCodeMissingMultiFactorSession;
- c = FIRAuthErrorCodeMissingMultiFactorInfo;
- c = FIRAuthErrorCodeInvalidMultiFactorSession;
- c = FIRAuthErrorCodeMultiFactorInfoNotFound;
- c = FIRAuthErrorCodeAdminRestrictedOperation;
- c = FIRAuthErrorCodeUnverifiedEmail;
- c = FIRAuthErrorCodeSecondFactorAlreadyEnrolled;
- c = FIRAuthErrorCodeMaximumSecondFactorCountExceeded;
- c = FIRAuthErrorCodeUnsupportedFirstFactor;
- c = FIRAuthErrorCodeEmailChangeNeedsVerification;
- c = FIRAuthErrorCodeMissingClientIdentifier;
- c = FIRAuthErrorCodeMissingOrInvalidNonce;
- c = FIRAuthErrorCodeBlockingCloudFunctionError;
- c = FIRAuthErrorCodeRecaptchaNotEnabled;
- c = FIRAuthErrorCodeMissingRecaptchaToken;
- c = FIRAuthErrorCodeInvalidRecaptchaToken;
- c = FIRAuthErrorCodeInvalidRecaptchaAction;
- c = FIRAuthErrorCodeMissingClientType;
- c = FIRAuthErrorCodeMissingRecaptchaVersion;
- c = FIRAuthErrorCodeInvalidRecaptchaVersion;
- c = FIRAuthErrorCodeInvalidReqType;
- c = FIRAuthErrorCodeRecaptchaSDKNotLinked;
- c = FIRAuthErrorCodeKeychainError;
- c = FIRAuthErrorCodeInternalError;
- c = FIRAuthErrorCodeMalformedJWT;
- }
- - (void)authSettings:(FIRAuthSettings *)settings {
- BOOL b = [settings isAppVerificationDisabledForTesting];
- [settings setAppVerificationDisabledForTesting:b];
- }
- - (void)authTokenResult:(FIRAuthTokenResult *)result {
- NSString *s = [result token];
- NSDate *d = [result expirationDate];
- d = [result authDate];
- d = [result issuedAtDate];
- s = [result signInProvider];
- s = [result signInSecondFactor];
- __unused NSDictionary<NSString *, NSObject *> *dict = [result claims];
- }
- #if !TARGET_OS_OSX && !TARGET_OS_WATCH
- - (void)authTokenResult {
- AuthUIImpl *impl = [[AuthUIImpl alloc] init];
- [impl presentViewController:[[UIViewController alloc] init]
- animated:NO
- completion:^{
- }];
- [impl dismissViewControllerAnimated:YES
- completion:^{
- }];
- }
- #endif
- - (void)FIREmailAuthProvider_h {
- FIRAuthCredential *c = [FIREmailAuthProvider credentialWithEmail:@"e" password:@"pw"];
- c = [FIREmailAuthProvider credentialWithEmail:@"e" link:@"l"];
- }
- - (void)FIRFacebookAuthProvider_h {
- __unused FIRAuthCredential *c = [FIRFacebookAuthProvider credentialWithAccessToken:@"token"];
- }
- #if TARGET_OS_IOS
- - (void)FIRFederatedAuthProvider_h {
- FederatedAuthImplementation *impl = [[FederatedAuthImplementation alloc] init];
- [impl getCredentialWithUIDelegate:nil
- completion:^(FIRAuthCredential *_Nullable c, NSError *_Nullable e){
- }];
- }
- #endif
- #if !TARGET_OS_WATCH
- - (void)FIRGameCenterAuthProvider_h {
- [FIRGameCenterAuthProvider getCredentialWithCompletion:^(FIRAuthCredential *_Nullable credential,
- NSError *_Nullable error){
- }];
- }
- #endif
- - (void)FIRGitHubAuthProvider_h {
- __unused FIRAuthCredential *c = [FIRGitHubAuthProvider credentialWithToken:@"token"];
- }
- - (void)FIRGoogleAuthProvider_h {
- __unused FIRAuthCredential *c = [FIRGoogleAuthProvider credentialWithIDToken:@"token"
- accessToken:@"token"];
- }
- #if TARGET_OS_IOS
- - (void)FIRMultiFactor_h:(FIRMultiFactor *)mf mfa:(FIRMultiFactorAssertion *)mfa {
- [mf getSessionWithCompletion:^(FIRMultiFactorSession *_Nullable credential,
- NSError *_Nullable error){
- }];
- [mf enrollWithAssertion:mfa
- displayName:@"name"
- completion:^(NSError *_Nullable error){
- }];
- FIRMultiFactorInfo *mfi = [mf enrolledFactors][0];
- [mf unenrollWithInfo:mfi
- completion:^(NSError *_Nullable error){
- }];
- [mf unenrollWithFactorUID:@"uid"
- completion:^(NSError *_Nullable error){
- }];
- }
- - (void)multiFactorAssertion:(FIRMultiFactorAssertion *)mfa {
- __unused NSString *s = [mfa factorID];
- }
- - (void)multiFactorInfo:(FIRMultiFactorInfo *)mfi {
- NSString *s = [mfi UID];
- s = [mfi factorID];
- s = [mfi displayName];
- __unused NSDate *d = [mfi enrollmentDate];
- }
- - (void)multiFactorResolver:(FIRMultiFactorResolver *)mfr {
- __unused FIRMultiFactorSession *s = [mfr session];
- __unused NSArray<FIRMultiFactorInfo *> *hints = [mfr hints];
- __unused FIRAuth *auth = [mfr auth];
- }
- #endif
- - (void)oauthCredential:(FIROAuthCredential *)credential {
- NSString *s = [credential IDToken];
- s = [credential accessToken];
- s = [credential secret];
- }
- #if TARGET_OS_IOS
- - (void)FIROAuthProvider_h:(FIROAuthProvider *)provider {
- FIROAuthProvider *p = [FIROAuthProvider providerWithProviderID:@""];
- p = [FIROAuthProvider providerWithProviderID:@"" auth:[FIRAuth auth]];
- FIROAuthCredential *c = [FIROAuthProvider credentialWithProviderID:@"id" accessToken:@"token"];
- c = [FIROAuthProvider credentialWithProviderID:@"id"
- IDToken:@"idToken"
- accessToken:@"accessToken"];
- c = [FIROAuthProvider credentialWithProviderID:@"id" IDToken:@"idtoken" rawNonce:@"nonce"];
- c = [FIROAuthProvider credentialWithProviderID:@"id"
- IDToken:@"token"
- rawNonce:@"nonce"
- accessToken:@"accessToken"];
- c = [FIROAuthProvider appleCredentialWithIDToken:@"idToken" rawNonce:@"nonce" fullName:nil];
- [provider getCredentialWithUIDelegate:nil
- completion:^(FIRAuthCredential *_Nullable credential,
- NSError *_Nullable error){
- }];
- __unused NSString *s = [provider providerID];
- __unused NSArray<NSString *> *scopes = [provider scopes];
- __unused NSDictionary<NSString *, NSString *> *params = [provider customParameters];
- }
- - (void)FIRPhoneAuthProvider_h:(FIRPhoneAuthProvider *)provider mfi:(FIRPhoneMultiFactorInfo *)mfi {
- [provider verifyPhoneNumber:@"123"
- UIDelegate:nil
- completion:^(NSString *_Nullable verificationID, NSError *_Nullable error){
- }];
- [provider verifyPhoneNumber:@"123"
- UIDelegate:nil
- multiFactorSession:nil
- completion:^(NSString *_Nullable verificationID, NSError *_Nullable error){
- }];
- [provider verifyPhoneNumberWithMultiFactorInfo:mfi
- UIDelegate:nil
- multiFactorSession:nil
- completion:^(NSString *_Nullable verificationID,
- NSError *_Nullable error){
- }];
- __unused FIRPhoneAuthCredential *c = [provider credentialWithVerificationID:@"id"
- verificationCode:@"code"];
- }
- - (void)FIRPhoneAuthProvider_h:(FIRPhoneAuthCredential *)credential {
- __unused FIRPhoneMultiFactorAssertion *a =
- [FIRPhoneMultiFactorGenerator assertionWithCredential:credential];
- }
- - (void)phoneMultiFactorInfo:(FIRPhoneMultiFactorInfo *)info {
- __unused NSString *s = [info phoneNumber];
- }
- - (void)FIRTOTPSecret_h:(FIRTOTPSecret *)secret {
- NSString *s = [secret sharedSecretKey];
- s = [secret generateQRCodeURLWithAccountName:@"name" issuer:@"issuer"];
- [secret openInOTPAppWithQRCodeURL:@"qr"];
- }
- - (void)FIRTOTPMultiFactorGenerator_h:(FIRMultiFactorSession *)session
- secret:(FIRTOTPSecret *)secret {
- [FIRTOTPMultiFactorGenerator
- generateSecretWithMultiFactorSession:session
- completion:^(FIRTOTPSecret *_Nullable secret,
- NSError *_Nullable error){
- }];
- FIRTOTPMultiFactorAssertion *a =
- [FIRTOTPMultiFactorGenerator assertionForEnrollmentWithSecret:secret oneTimePassword:@"pw"];
- a = [FIRTOTPMultiFactorGenerator assertionForSignInWithEnrollmentID:@"id" oneTimePassword:@"pw"];
- }
- #endif
- - (void)FIRTwitterAuthProvider_h {
- __unused FIRAuthCredential *c = [FIRTwitterAuthProvider credentialWithToken:@"token"
- secret:@"secret"];
- }
- - (void)FIRUser_h:(FIRUser *)user credential:(FIRAuthCredential *)credential {
- [user updatePassword:@"pw"
- completion:^(NSError *_Nullable error){
- }];
- [user reloadWithCompletion:^(NSError *_Nullable error){
- }];
- [user reauthenticateWithCredential:credential
- completion:^(FIRAuthDataResult *_Nullable authResult,
- NSError *_Nullable error){
- }];
- #if TARGET_OS_IOS
- FIRPhoneAuthProvider *provider = [FIRPhoneAuthProvider provider];
- FIRPhoneAuthCredential *phoneCredential = [provider credentialWithVerificationID:@"id"
- verificationCode:@"code"];
- [user updatePhoneNumberCredential:phoneCredential
- completion:^(NSError *_Nullable error){
- }];
- [user reauthenticateWithProvider:(NSObject<FIRFederatedAuthProvider> *)provider
- UIDelegate:nil
- completion:^(FIRAuthDataResult *_Nullable authResult,
- NSError *_Nullable error){
- }];
- [user linkWithProvider:(NSObject<FIRFederatedAuthProvider> *)provider
- UIDelegate:nil
- completion:^(FIRAuthDataResult *_Nullable authResult, NSError *_Nullable error){
- }];
- #endif
- [user getIDTokenResultWithCompletion:^(FIRAuthTokenResult *_Nullable tokenResult,
- NSError *_Nullable error){
- }];
- [user getIDTokenResultForcingRefresh:YES
- completion:^(FIRAuthTokenResult *_Nullable tokenResult,
- NSError *_Nullable error){
- }];
- [user getIDTokenWithCompletion:^(NSString *_Nullable token, NSError *_Nullable error){
- }];
- [user getIDTokenForcingRefresh:NO
- completion:^(NSString *_Nullable token, NSError *_Nullable error){
- }];
- [user linkWithCredential:credential
- completion:^(FIRAuthDataResult *_Nullable authResult, NSError *_Nullable error){
- }];
- [user unlinkFromProvider:@"provider"
- completion:^(FIRUser *_Nullable user, NSError *_Nullable error){
- }];
- [user sendEmailVerificationWithCompletion:^(NSError *_Nullable error){
- }];
- [user sendEmailVerificationBeforeUpdatingEmail:@"email"
- completion:^(NSError *_Nullable error){
- }];
- FIRActionCodeSettings *settings = [[FIRActionCodeSettings alloc] init];
- [user sendEmailVerificationWithActionCodeSettings:settings
- completion:^(NSError *_Nullable error){
- }];
- [user sendEmailVerificationBeforeUpdatingEmail:@"email"
- actionCodeSettings:settings
- completion:^(NSError *_Nullable error){
- }];
- [user deleteWithCompletion:^(NSError *_Nullable error){
- }];
- FIRUserProfileChangeRequest *changeRequest = [user profileChangeRequest];
- [changeRequest commitChangesWithCompletion:^(NSError *_Nullable error){
- }];
- NSString *s = [user providerID];
- s = [user uid];
- s = [user displayName];
- s = [user email];
- s = [user phoneNumber];
- s = [changeRequest displayName];
- NSURL *u = [changeRequest photoURL];
- u = [user photoURL];
- [changeRequest setDisplayName:s];
- [changeRequest setPhotoURL:u];
- }
- - (void)userProperties:(FIRUser *)user {
- BOOL b = [user isAnonymous];
- b = [user isEmailVerified];
- __unused NSArray<NSObject<FIRUserInfo> *> *userInfo = [user providerData];
- __unused FIRUserMetadata *meta = [user metadata];
- #if TARGET_OS_IOS
- __unused FIRMultiFactor *mf = [user multiFactor];
- #endif
- NSString *s = [user refreshToken];
- s = [user tenantID];
- FIRUserProfileChangeRequest *changeRequest = [user profileChangeRequest];
- s = [changeRequest displayName];
- NSURL *u = [changeRequest photoURL];
- [changeRequest setDisplayName:s];
- [changeRequest setPhotoURL:u];
- }
- - (void)userInfoProperties:(NSObject<FIRUserInfo> *)userInfo {
- NSString *s = [userInfo providerID];
- s = [userInfo uid];
- s = [userInfo displayName];
- s = [userInfo email];
- s = [userInfo phoneNumber];
- __unused NSURL *u = [userInfo photoURL];
- }
- - (void)userMetadataProperties:(FIRUserMetadata *)metadata {
- NSDate *d = [metadata lastSignInDate];
- d = [metadata creationDate];
- }
- @end
|