RLMEmailPasswordAuth
Objective-C
@interface RLMEmailPasswordAuth : RLMProviderClient
Swift
@_nonSendable(_assumed) class RLMEmailPasswordAuth : RLMProviderClient, @unchecked Sendable
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;Swift
func registerUser(email: String, password: String) async throwsParameters
emailThe email address of the user to register.
passwordThe password that the user created for the new email/password identity.
completionHandlerA 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;Swift
func confirmUser(_ token: String, tokenId: String) async throwsParameters
tokenThe confirmation token that was emailed to the user.
tokenIdThe confirmation token id that was emailed to the user.
completionHandlerA 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;Swift
func resendConfirmationEmail(_ email: String) async throwsParameters
emailThe email address of the user to re-send a confirmation for.
completionHandlerA callback to be invoked once the call is complete.
-
Retries custom confirmation function for a given email address.
Declaration
Objective-C
- (void)retryCustomConfirmation:(nonnull NSString *)email completion:(nonnull RLMEmailPasswordAuthOptionalErrorBlock) completionHandler;Swift
func retryCustomConfirmation(_ email: String) async throwsParameters
emailThe email address of the user to retry custom confirmation logic.
completionHandlerA 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;Swift
func sendResetPasswordEmail(_ email: String) async throwsParameters
emailThe email address of the user to send a password reset email for.
completionHandlerA 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;Swift
func resetPassword(to password: String, token: String, tokenId: String) async throwsParameters
passwordThe new password.
tokenThe password reset token that was emailed to the user.
tokenIdThe password reset token id that was emailed to the user.
completionHandlerA 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
emailThe email address of the user.
passwordThe desired new password.
argsA list of arguments passed in as a BSON array.
completionHandlerA callback to be invoked once the call is complete.
View on GitHub
Install in Dash