aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase/Auth/Source/Public/FIRUser.h
diff options
context:
space:
mode:
Diffstat (limited to 'Firebase/Auth/Source/Public/FIRUser.h')
-rw-r--r--Firebase/Auth/Source/Public/FIRUser.h190
1 files changed, 75 insertions, 115 deletions
diff --git a/Firebase/Auth/Source/Public/FIRUser.h b/Firebase/Auth/Source/Public/FIRUser.h
index 7e22329..1bba710 100644
--- a/Firebase/Auth/Source/Public/FIRUser.h
+++ b/Firebase/Auth/Source/Public/FIRUser.h
@@ -34,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN
@param token Optionally; an access token if the request was successful.
@param error Optionally; the error which occurred - or nil if the request was successful.
- @remarks One of: @c token or @c error will always be non-nil.
+ @remarks One of: `token` or `error` will always be non-nil.
*/
typedef void (^FIRAuthTokenCallback)(NSString *_Nullable token, NSError *_Nullable error)
NS_SWIFT_NAME(AuthTokenCallback);
@@ -91,8 +91,8 @@ NS_SWIFT_NAME(User)
/** @fn init
@brief This class should not be instantiated.
- @remarks To retrieve the current user, use @c FIRAuth.currentUser. To sign a user
- in or out, use the methods on @c FIRAuth.
+ @remarks To retrieve the current user, use `FIRAuth.currentUser`. To sign a user
+ in or out, use the methods on `FIRAuth`.
*/
- (instancetype)init NS_UNAVAILABLE;
@@ -107,29 +107,22 @@ NS_SWIFT_NAME(User)
Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidRecipientEmail - Indicates an invalid recipient email was
+
+ + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
sent in the request.
- </li>
- <li>@c FIRAuthErrorCodeInvalidSender - Indicates an invalid sender email is set in
+ + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
the console for this action.
- </li>
- <li>@c FIRAuthErrorCodeInvalidMessagePayload - Indicates an invalid email template for
+ + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
sending update email.
- </li>
- <li>@c FIRAuthErrorCodeEmailAlreadyInUse - Indicates the email is already in use by another
+ + `FIRAuthErrorCodeEmailAlreadyInUse` - Indicates the email is already in use by another
account.
- </li>
- <li>@c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.
- </li>
- <li>@c FIRAuthErrorCodeRequiresRecentLogin - Updating a user’s email is a security
+ + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+ + `FIRAuthErrorCodeRequiresRecentLogin` - Updating a user’s email is a security
sensitive operation that requires a recent login from the user. This error indicates
the user has not signed in recently enough. To resolve, reauthenticate the user by
invoking reauthenticateWithCredential:completion: on FIRUser.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
*/
- (void)updateEmail:(NSString *)email completion:(nullable FIRUserProfileChangeCallback)completion
NS_SWIFT_NAME(updateEmail(to:completion:));
@@ -142,22 +135,18 @@ NS_SWIFT_NAME(User)
Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates the administrator disabled
+
+ + `FIRAuthErrorCodeOperationNotAllowed` - Indicates the administrator disabled
sign in with the specified identity provider.
- </li>
- <li>@c FIRAuthErrorCodeRequiresRecentLogin - Updating a user’s password is a security
+ + `FIRAuthErrorCodeRequiresRecentLogin` - Updating a user’s password is a security
sensitive operation that requires a recent login from the user. This error indicates
the user has not signed in recently enough. To resolve, reauthenticate the user by
invoking reauthenticateWithCredential:completion: on FIRUser.
- </li>
- <li>@c FIRAuthErrorCodeWeakPassword - Indicates an attempt to set a password that is
+ + `FIRAuthErrorCodeWeakPassword` - Indicates an attempt to set a password that is
considered too weak. The NSLocalizedFailureReasonErrorKey field in the NSError.userInfo
dictionary object will contain more detailed explanation that can be shown to the user.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
*/
- (void)updatePassword:(NSString *)password
completion:(nullable FIRUserProfileChangeCallback)completion
@@ -175,15 +164,13 @@ NS_SWIFT_NAME(User)
Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeRequiresRecentLogin - Updating a user’s phone number is a security
+
+ + `FIRAuthErrorCodeRequiresRecentLogin` - Updating a user’s phone number is a security
sensitive operation that requires a recent login from the user. This error indicates
the user has not signed in recently enough. To resolve, reauthenticate the user by
invoking reauthenticateWithCredential:completion: on FIRUser.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
*/
- (void)updatePhoneNumberCredential:(FIRPhoneAuthCredential *)phoneNumberCredential
completion:(nullable FIRUserProfileChangeCallback)completion;
@@ -193,7 +180,7 @@ NS_SWIFT_NAME(User)
@brief Creates an object which may be used to change the user's profile data.
@remarks Set the properties of the returned object, then call
- @c FIRUserProfileChangeRequest.commitChangesWithCallback: to perform the updates atomically.
+ `FIRUserProfileChangeRequest.commitChangesWithCallback:` to perform the updates atomically.
@return An object which may be used to change the user's profile data atomically.
*/
@@ -205,16 +192,16 @@ NS_SWIFT_NAME(User)
@param completion Optionally; the block invoked when the reload has finished. Invoked
asynchronously on the main thread in the future.
- @remarks May fail with a @c FIRAuthErrorCodeRequiresRecentLogin error code. In this case
- you should call @c FIRUser.reauthenticateWithCredential:completion: before re-invoking
- @c FIRUser.updateEmail:completion:.
+ @remarks May fail with a `FIRAuthErrorCodeRequiresRecentLogin` error code. In this case
+ you should call `FIRUser.reauthenticateWithCredential:completion:` before re-invoking
+ `FIRUser.updateEmail:completion:`.
- @remarks See @c 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)reloadWithCompletion:(nullable FIRUserProfileChangeCallback)completion;
/** @fn reauthenticateWithCredential:completion:
- @brief Convenience method for @c reauthenticateAndRetrieveDataWithCredential:completion: This
+ @brief Convenience method for `reauthenticateAndRetrieveDataWithCredential:completion:` This
method doesn't return additional identity provider data.
*/
- (void)reauthenticateWithCredential:(FIRAuthCredential *)credential
@@ -234,33 +221,27 @@ NS_SWIFT_NAME(User)
user remains signed in.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidCredential - Indicates the supplied credential is invalid.
+
+ + `FIRAuthErrorCodeInvalidCredential` - Indicates the supplied credential is invalid.
This could happen if it has expired or it is malformed.
- </li>
- <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates that accounts with the
+ + `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.
- </li>
- <li>@c FIRAuthErrorCodeEmailAlreadyInUse - Indicates the email asserted by the credential
+ + `FIRAuthErrorCodeEmailAlreadyInUse` - 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 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. Please note that the
error code raised in this specific situation may not be the same on Web and Android.
- </li>
- <li>@c FIRAuthErrorCodeUserDisabled - Indicates the user's account is disabled.
- </li>
- <li>@c FIRAuthErrorCodeWrongPassword - Indicates the user attempted reauthentication with
+ + `FIRAuthErrorCodeUserDisabled` - Indicates the user's account is disabled.
+ + `FIRAuthErrorCodeWrongPassword` - Indicates the user attempted reauthentication with
an incorrect password, if credential is of the type EmailPasswordAuthCredential.
- </li>
- <li>@c FIRAuthErrorCodeUserMismatch - Indicates that an attempt was made to
+ + `FIRAuthErrorCodeUserMismatch` - Indicates that an attempt was made to
reauthenticate with a user which is not the current user.
- </li>
- <li>@c FIRAuthErrorCodeInvalidEmail - Indicates the email address is malformed.</li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all API methods.
+ + `FIRAuthErrorCodeInvalidEmail` - Indicates the email address is malformed.
+
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all API methods.
*/
- (void)reauthenticateAndRetrieveDataWithCredential:(FIRAuthCredential *) credential
completion:(nullable FIRAuthDataResultCallback) completion;
@@ -271,18 +252,18 @@ NS_SWIFT_NAME(User)
@param completion Optionally; the block invoked when the token is available. Invoked
asynchronously on the main thread in the future.
- @remarks See @c 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)getIDTokenWithCompletion:(nullable FIRAuthTokenCallback)completion
NS_SWIFT_NAME(getIDToken(completion:));
/** @fn getTokenWithCompletion:
- @brief Please use @c getIDTokenWithCompletion: instead.
+ @brief Please use `getIDTokenWithCompletion:` instead.
@param completion Optionally; the block invoked when the token is available. Invoked
asynchronously on the main thread in the future.
- @remarks See @c 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)getTokenWithCompletion:(nullable FIRAuthTokenCallback)completion
NS_SWIFT_NAME(getToken(completion:)) __attribute__((deprecated));
@@ -296,9 +277,9 @@ NS_SWIFT_NAME(User)
asynchronously on the main thread in the future.
@remarks The authentication token will be refreshed (by making a network request) if it has
- expired, or if @c forceRefresh is YES.
+ expired, or if `forceRefresh` is YES.
- @remarks See @c 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)getIDTokenForcingRefresh:(BOOL)forceRefresh
completion:(nullable FIRAuthTokenCallback)completion;
@@ -312,16 +293,16 @@ NS_SWIFT_NAME(User)
asynchronously on the main thread in the future.
@remarks The authentication token will be refreshed (by making a network request) if it has
- expired, or if @c forceRefresh is YES.
+ expired, or if `forceRefresh` is YES.
- @remarks See @c 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)getTokenForcingRefresh:(BOOL)forceRefresh
completion:(nullable FIRAuthTokenCallback)completion
__attribute__((deprecated));
/** @fn linkWithCredential:completion:
- @brief Convenience method for @c linkAndRetrieveDataWithCredential:completion: This method
+ @brief Convenience method for `linkAndRetrieveDataWithCredential:completion:` This method
doesn't return additional identity provider data.
*/
- (void)linkWithCredential:(FIRAuthCredential *)credential
@@ -336,24 +317,20 @@ NS_SWIFT_NAME(User)
Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeProviderAlreadyLinked - Indicates an attempt to link a provider of a
+
+ + `FIRAuthErrorCodeProviderAlreadyLinked` - Indicates an attempt to link a provider of a
type already linked to this account.
- </li>
- <li>@c FIRAuthErrorCodeCredentialAlreadyInUse - Indicates an attempt to link with a
+ + `FIRAuthErrorCodeCredentialAlreadyInUse` - Indicates an attempt to link with a
credential
that has already been linked with a different Firebase account.
- </li>
- <li>@c FIRAuthErrorCodeOperationNotAllowed - Indicates that accounts with the identity
+ + `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.
- </li>
- </ul>
@remarks This method may also return error codes associated with updateEmail:completion: and
updatePassword:completion: on FIRUser.
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
*/
- (void)linkAndRetrieveDataWithCredential:(FIRAuthCredential *) credential
completion:(nullable FIRAuthDataResultCallback) completion;
@@ -366,18 +343,15 @@ NS_SWIFT_NAME(User)
Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeNoSuchProvider - Indicates an attempt to unlink a provider
+
+ + `FIRAuthErrorCodeNoSuchProvider` - Indicates an attempt to unlink a provider
that is not linked to the account.
- </li>
- <li>@c FIRAuthErrorCodeRequiresRecentLogin - Updating email is a security sensitive
+ + `FIRAuthErrorCodeRequiresRecentLogin` - Updating email is a security sensitive
operation that requires a recent login from the user. This error indicates the user
has not signed in recently enough. To resolve, reauthenticate the user by invoking
reauthenticateWithCredential:completion: on FIRUser.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
*/
- (void)unlinkFromProvider:(NSString *)provider
completion:(nullable FIRAuthResultCallback)completion;
@@ -389,54 +363,42 @@ NS_SWIFT_NAME(User)
is complete, or fails. Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidRecipientEmail - Indicates an invalid recipient email was
+
+ + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
sent in the request.
- </li>
- <li>@c FIRAuthErrorCodeInvalidSender - Indicates an invalid sender email is set in
+ + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
the console for this action.
- </li>
- <li>@c FIRAuthErrorCodeInvalidMessagePayload - Indicates an invalid email template for
+ + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
sending update email.
- </li>
- <li>@c FIRAuthErrorCodeUserNotFound - Indicates the user account was not found.</li>
- </ul>
+ + `FIRAuthErrorCodeUserNotFound` - Indicates the user account was not found.
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
*/
- (void)sendEmailVerificationWithCompletion:(nullable FIRSendEmailVerificationCallback)completion;
/** @fn sendEmailVerificationWithActionCodeSettings:completion:
@brief Initiates email verification for the user.
- @param actionCodeSettings An @c FIRActionCodeSettings object containing settings related to
+ @param actionCodeSettings An `FIRActionCodeSettings` object containing settings related to
handling action codes.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeInvalidRecipientEmail - Indicates an invalid recipient email was
+
+ + `FIRAuthErrorCodeInvalidRecipientEmail` - Indicates an invalid recipient email was
sent in the request.
- </li>
- <li>@c FIRAuthErrorCodeInvalidSender - Indicates an invalid sender email is set in
+ + `FIRAuthErrorCodeInvalidSender` - Indicates an invalid sender email is set in
the console for this action.
- </li>
- <li>@c FIRAuthErrorCodeInvalidMessagePayload - Indicates an invalid email template for
+ + `FIRAuthErrorCodeInvalidMessagePayload` - Indicates an invalid email template for
sending update email.
- </li>
- <li>@c FIRAuthErrorCodeUserNotFound - Indicates the user account was not found.</li>
- <li>@c FIRAuthErrorCodeMissingIosBundleID - Indicates that the iOS bundle ID is missing when
+ + `FIRAuthErrorCodeUserNotFound` - Indicates the user account was not found.
+ + `FIRAuthErrorCodeMissingIosBundleID` - Indicates that the iOS bundle ID is missing when
a iOS App Store ID is provided.
- </li>
- <li>@c FIRAuthErrorCodeMissingAndroidPackageName - Indicates that the android package name
- is missing when the @c androidInstallApp flag is set to true.
- </li>
- <li>@c FIRAuthErrorCodeUnauthorizedDomain - Indicates that the domain specified in the
+ + `FIRAuthErrorCodeMissingAndroidPackageName` - Indicates that the android package name
+ is missing when the `androidInstallApp` flag is set to true.
+ + `FIRAuthErrorCodeUnauthorizedDomain` - Indicates that the domain specified in the
continue URL is not whitelisted in the Firebase console.
- </li>
- <li>@c FIRAuthErrorCodeInvalidContinueURI - Indicates that the domain specified in the
+ + `FIRAuthErrorCodeInvalidContinueURI` - Indicates that the domain specified in the
continue URI is not valid.
- </li>
- </ul>
*/
- (void)sendEmailVerificationWithActionCodeSettings:(FIRActionCodeSettings *)actionCodeSettings
completion:(nullable FIRSendEmailVerificationCallback)
@@ -449,15 +411,13 @@ NS_SWIFT_NAME(User)
complete, or fails. Invoked asynchronously on the main thread in the future.
@remarks Possible error codes:
- <ul>
- <li>@c FIRAuthErrorCodeRequiresRecentLogin - Updating email is a security sensitive
+
+ + `FIRAuthErrorCodeRequiresRecentLogin` - Updating email is a security sensitive
operation that requires a recent login from the user. This error indicates the user
has not signed in recently enough. To resolve, reauthenticate the user by invoking
reauthenticateWithCredential:completion: on FIRUser.
- </li>
- </ul>
- @remarks See @c FIRAuthErrors for a list of error codes that are common to all FIRUser methods.
+ @remarks See `FIRAuthErrors` for a list of error codes that are common to all FIRUser methods.
*/
- (void)deleteWithCompletion:(nullable FIRUserProfileChangeCallback)completion;
@@ -473,21 +433,21 @@ NS_SWIFT_NAME(UserProfileChangeRequest)
@interface FIRUserProfileChangeRequest : NSObject
/** @fn init
- @brief Please use @c FIRUser.profileChangeRequest
+ @brief Please use `FIRUser.profileChangeRequest`
*/
- (instancetype)init NS_UNAVAILABLE;
/** @property displayName
@brief The user's display name.
@remarks It is an error to set this property after calling
- @c FIRUserProfileChangeRequest.commitChangesWithCallback:
+ `FIRUserProfileChangeRequest.commitChangesWithCallback:`
*/
@property(nonatomic, copy, nullable) NSString *displayName;
/** @property photoURL
@brief The user's photo URL.
@remarks It is an error to set this property after calling
- @c FIRUserProfileChangeRequest.commitChangesWithCallback:
+ `FIRUserProfileChangeRequest.commitChangesWithCallback:`
*/
@property(nonatomic, copy, nullable) NSURL *photoURL;