aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase/Auth/Source/Public/FIRAuth.h
diff options
context:
space:
mode:
Diffstat (limited to 'Firebase/Auth/Source/Public/FIRAuth.h')
-rw-r--r--Firebase/Auth/Source/Public/FIRAuth.h89
1 files changed, 69 insertions, 20 deletions
diff --git a/Firebase/Auth/Source/Public/FIRAuth.h b/Firebase/Auth/Source/Public/FIRAuth.h
index 711e4b6..c20ecbe 100644
--- a/Firebase/Auth/Source/Public/FIRAuth.h
+++ b/Firebase/Auth/Source/Public/FIRAuth.h
@@ -370,7 +370,7 @@ NS_SWIFT_NAME(Auth)
*/
- (void)signInWithEmail:(NSString *)email
password:(NSString *)password
- completion:(nullable FIRAuthResultCallback)completion;
+ completion:(nullable FIRAuthDataResultCallback)completion;
/** @fn signInWithEmail:link:completion:
@brief Signs in using an email address and email sign-in link.
@@ -397,7 +397,8 @@ NS_SWIFT_NAME(Auth)
completion:(nullable FIRAuthDataResultCallback)completion;
/** @fn signInAndRetrieveDataWithEmail:password:completion:
- @brief Signs in using an email address and password.
+ @brief Please use `signInWithEmail:password:completion:` for Objective-C or
+ `signIn(withEmail:password:completion:)` for Swift instead.
@param email The user's email address.
@param password The user's password.
@@ -417,23 +418,62 @@ NS_SWIFT_NAME(Auth)
@remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
-
- @remarks This method will only exist until the next major Firebase release following 4.x.x.
- After the next major release the method `signInWithEmail:password:completion:` will support
- the `FIRAuthDataResultCallback`.
*/
- (void)signInAndRetrieveDataWithEmail:(NSString *)email
password:(NSString *)password
- completion:(nullable FIRAuthDataResultCallback)completion;
+ completion:(nullable FIRAuthDataResultCallback)completion
+ DEPRECATED_MSG_ATTRIBUTE(
+ "signInAndRetrieveDataWithEmail:password:completion: is "
+ "deprecated. Please use"
+ " signInWithEmail:password:completion: for Objective-C or"
+ " signIn(withEmail:password:completion:) for Swift instead.");
/** @fn signInWithCredential:completion:
- @brief Please use `signInAndRetrieveDataWithCredential:completion:` instead. This method
- doesn't return additional identity provider data.
+ @brief Please use `signInAndRetrieveDataWithCredential:completion:` for Objective-C or
+ `signInAndRetrieveData(with:completion:)` for swift instead
+
+ @param credential The credential supplied by the IdP.
+ @param completion Optionally; a block which is invoked when the sign in flow finishes, or is
+ canceled. Invoked asynchronously on the main thread in the future.
+
+ @remarks Possible error codes:
+
+ + `FIRAuthErrorCodeInvalidCredential` - Indicates the supplied credential is invalid.
+ This could happen if it has expired or it is malformed.
+ + `FIRAuthErrorCodeOperationNotAllowed` - Indicates that accounts
+ with the identity provider represented by the credential are not enabled.
+ Enable them in the Auth section of the Firebase console.
+ + `FIRAuthErrorCodeAccountExistsWithDifferentCredential` - Indicates the email asserted
+ by the credential (e.g. the email in a Facebook access token) is already in use by an
+ existing account, that cannot be authenticated with this sign-in method. Call
+ fetchProvidersForEmail for this user’s email and then prompt them to sign in with any of
+ the sign-in providers returned. This error will only be thrown if the "One account per
+ email address" setting is enabled in the Firebase console, under Auth settings.
+ + `FIRAuthErrorCodeUserDisabled` - Indicates the user's account is disabled.
+ + `FIRAuthErrorCodeWrongPassword` - Indicates the user attempted sign in with an
+ incorrect password, if credential is of the type EmailPasswordAuthCredential.
+ + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+ + `FIRAuthErrorCodeMissingVerificationID` - Indicates that the phone auth credential was
+ created with an empty verification ID.
+ + `FIRAuthErrorCodeMissingVerificationCode` - Indicates that the phone auth credential
+ was created with an empty verification code.
+ + `FIRAuthErrorCodeInvalidVerificationCode` - Indicates that the phone auth credential
+ was created with an invalid verification Code.
+ + `FIRAuthErrorCodeInvalidVerificationID` - Indicates that the phone auth credential was
+ created with an invalid verification ID.
+ + `FIRAuthErrorCodeSessionExpired` - Indicates that the SMS code has expired.
+
+
+
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods
*/
- (void)signInWithCredential:(FIRAuthCredential *)credential
- completion:(nullable FIRAuthResultCallback)completion
- DEPRECATED_MSG_ATTRIBUTE("signInWithCredential: is deprecated. Please use "
- "signInAndRetrieveDataWithCredential:completion:` instead.");
+ completion:(nullable FIRAuthResultCallback)completion DEPRECATED_MSG_ATTRIBUTE(
+ "signInWithCredential:completion: is"
+ " deprecated. Please use"
+ " signInAndRetrieveDataWithCredential:completion: for"
+ " Objective-C or signInAndRetrieveData(with:completion:) for"
+ " Swift instead.");
/** @fn signInAndRetrieveDataWithCredential:completion:
@brief Asynchronously signs in to Firebase with the given 3rd-party credentials (e.g. a Facebook
@@ -473,7 +513,7 @@ NS_SWIFT_NAME(Auth)
- @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods
*/
- (void)signInAndRetrieveDataWithCredential:(FIRAuthCredential *)credential
completion:(nullable FIRAuthDataResultCallback)completion;
@@ -493,10 +533,11 @@ NS_SWIFT_NAME(Auth)
@remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
-- (void)signInAnonymouslyWithCompletion:(nullable FIRAuthResultCallback)completion;
+- (void)signInAnonymouslyWithCompletion:(nullable FIRAuthDataResultCallback)completion;
/** @fn signInAnonymouslyAndRetrieveDataWithCompletion:
- @brief Asynchronously creates and becomes an anonymous user.
+ @brief `Please use sign `signInAnonymouslyWithCompletion:` for Objective-C or
+ `signInAnonymously(Completion:)` for Swift instead.
@param completion Optionally; a block which is invoked when the sign in finishes, or is
canceled. Invoked asynchronously on the main thread in the future.
@@ -516,7 +557,10 @@ NS_SWIFT_NAME(Auth)
`FIRAuthDataResultCallback`.
*/
- (void)signInAnonymouslyAndRetrieveDataWithCompletion:
- (nullable FIRAuthDataResultCallback)completion;
+ (nullable FIRAuthDataResultCallback)completion
+ DEPRECATED_MSG_ATTRIBUTE("signInAnonymouslyAndRetrieveDataWithCompletion: is deprecated."
+ " Please use signInAnonymouslyWithCompletion: for Objective-C or"
+ " signInAnonymously(Completion:) for swift instead.");
/** @fn signInWithCustomToken:completion:
@brief Asynchronously signs in to Firebase with the given Auth token.
@@ -537,10 +581,11 @@ NS_SWIFT_NAME(Auth)
@remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
- (void)signInWithCustomToken:(NSString *)token
- completion:(nullable FIRAuthResultCallback)completion;
+ completion:(nullable FIRAuthDataResultCallback)completion;
/** @fn signInAndRetrieveDataWithCustomToken:completion:
- @brief Asynchronously signs in to Firebase with the given Auth token.
+ @brief Please use `signInWithCustomToken:completion:` or `signIn(withCustomToken:completion:)`
+ for Swift instead.
@param token A self-signed custom auth token.
@param completion Optionally; a block which is invoked when the sign in finishes, or is
@@ -563,8 +608,12 @@ NS_SWIFT_NAME(Auth)
support the `FIRAuthDataResultCallback`.
*/
- (void)signInAndRetrieveDataWithCustomToken:(NSString *)token
- completion:(nullable FIRAuthDataResultCallback)completion;
-
+ completion:(nullable FIRAuthDataResultCallback)completion
+ DEPRECATED_MSG_ATTRIBUTE(
+ "signInAndRetrieveDataWithCustomToken:completion: is"
+ " deprecated. Please use signInWithCustomToken:completion:"
+ "for Objective-C or signIn(withCustomToken:completion:) for"
+ " Swift instead.");
/** @fn createUserWithEmail:password:completion:
@brief Creates and, on success, signs in a user with the given email address and password.