RLMEmailPasswordAuth
@interface RLMEmailPasswordAuth : RLMProviderClient
A client for the email/password authentication provider which can be used to obtain a credential for logging in, and to perform requests specifically related to the email/password provider.
-
Registers a new email identity with the email/password provider, and sends a confirmation email to the provided address.
Declaration
Objective-C
- (void)registerUserWithEmail:(nonnull NSString *)email password:(nonnull NSString *)password completion:(nonnull RLMEmailPasswordAuthOptionalErrorBlock) completionHandler;
Parameters
email
The email address of the user to register.
password
The password that the user created for the new email/password identity.
completionHandler
A callback to be invoked once the call is complete.
-
Confirms an email identity with the email/password provider.
Declaration
Objective-C
- (void)confirmUser:(nonnull NSString *)token tokenId:(nonnull NSString *)tokenId completion: (nonnull RLMEmailPasswordAuthOptionalErrorBlock)completionHandler;
Parameters
token
The confirmation token that was emailed to the user.
tokenId
The confirmation token id that was emailed to the user.
completionHandler
A callback to be invoked once the call is complete.
-
Re-sends a confirmation email to a user that has registered but not yet confirmed their email address.
Declaration
Objective-C
- (void)resendConfirmationEmail:(nonnull NSString *)email completion:(nonnull RLMEmailPasswordAuthOptionalErrorBlock) completionHandler;
Parameters
email
The email address of the user to re-send a confirmation for.
completionHandler
A callback to be invoked once the call is complete.
-
Sends a password reset email to the given email address.
Declaration
Objective-C
- (void)sendResetPasswordEmail:(nonnull NSString *)email completion:(nonnull RLMEmailPasswordAuthOptionalErrorBlock) completionHandler;
Parameters
email
The email address of the user to send a password reset email for.
completionHandler
A callback to be invoked once the call is complete.
-
Resets the password of an email identity using the password reset token emailed to a user.
Declaration
Objective-C
- (void)resetPasswordTo:(nonnull NSString *)password token:(nonnull NSString *)token tokenId:(nonnull NSString *)tokenId completion:(nonnull RLMEmailPasswordAuthOptionalErrorBlock) completionHandler;
Parameters
password
The new password.
token
The password reset token that was emailed to the user.
tokenId
The password reset token id that was emailed to the user.
completionHandler
A callback to be invoked once the call is complete.
-
Resets the password of an email identity using the password reset function set up in the application.
Declaration
Objective-C
- (void)callResetPasswordFunction:(nonnull NSString *)email password:(nonnull NSString *)password args:(nonnull NSArray<id<RLMBSON>> *)args completion: (nonnull RLMEmailPasswordAuthOptionalErrorBlock) completionHandler;
Parameters
email
The email address of the user.
password
The desired new password.
args
A list of arguments passed in as a BSON array.
completionHandler
A callback to be invoked once the call is complete.