Skip to content

Commit

Permalink
Docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
renkelvin committed Nov 8, 2023
1 parent a346b93 commit d4c48f7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
19 changes: 14 additions & 5 deletions FirebaseAuth/Sources/Public/FirebaseAuth/FIRAuth.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,9 @@ NS_SWIFT_NAME(Auth)

/** @fn fetchSignInMethodsForEmail:completion:
@brief Fetches the list of all sign-in methods previously used for the provided email address.
This method returns an empty list when [Email Enumeration
Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection)
is enabled, irrespective of the number of authentication methods available for the given email.
@param email The email address for which to obtain a list of sign-in methods.
@param completion Optionally; a block which is invoked when the list of sign in methods for the
specified email address is ready or an error was encountered. Invoked asynchronously on the
Expand All @@ -393,10 +395,15 @@ NS_SWIFT_NAME(Auth)

- (void)fetchSignInMethodsForEmail:(NSString *)email
completion:(nullable void (^)(NSArray<NSString *> *_Nullable,
NSError *_Nullable))completion;
NSError *_Nullable))completion
DEPRECATED_MSG_ATTRIBUTE(
"This method returns an empty list when Email Enumeration Protection is enabled.");

/** @fn signInWithEmail:password:completion:
@brief Signs in using an email address and password.
@brief Signs in using an email address and password. When [Email Enumeration
Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection)
is enabled, this method fails with "auth/invalid-credential" in case of an invalid
email/password.
@param email The user's email address.
@param password The user's password.
Expand Down Expand Up @@ -663,8 +670,10 @@ NS_SWIFT_NAME(Auth)
- (void)applyActionCode:(NSString *)code completion:(void (^)(NSError *_Nullable error))completion;

/** @fn sendPasswordResetWithEmail:completion:
@brief Initiates a password reset for the given email address.
@brief Initiates a password reset for the given email address. This method does not throw an
error when [Email Enumeration
Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection)
is enabled.
@param email The email address of the user.
@param completion Optionally; a block which is invoked when the request finishes. Invoked
asynchronously on the main thread in the future.
Expand Down
8 changes: 6 additions & 2 deletions FirebaseAuth/Sources/Public/FirebaseAuth/FIRUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ NS_SWIFT_NAME(User)

/** @fn updateEmail:completion:
@brief Updates the email address for the user. On success, the cached user profile data is
updated.
updated. Throws "auth/operation-not-allowed" error when [Email Enumeration
Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection)
is enabled.
@remarks May fail if there is already an account with this email address that was created using
email and password authentication.
Expand Down Expand Up @@ -160,7 +162,9 @@ NS_SWIFT_NAME(User)
*/
- (void)updateEmail:(NSString *)email
completion:(nullable void (^)(NSError *_Nullable error))completion
NS_SWIFT_NAME(updateEmail(to:completion:));
NS_SWIFT_NAME(updateEmail(to:completion:))
DEPRECATED_MSG_ATTRIBUTE("Use verifyBeforeUpdateEmail() instead.");
;

/** @fn updatePassword:completion:
@brief Updates the password for the user. On success, the cached user profile data is updated.
Expand Down

0 comments on commit d4c48f7

Please sign in to comment.