RLMUsernamePasswordProviderClient

@interface RLMUsernamePasswordProviderClient : RLMProviderClient

A client for the username/password authentication provider which can be used to obtain a credential for logging in, and to perform requests specifically related to the username/password provider.

  • Registers a new email identity with the username/password provider, and sends a confirmation email to the provided address.

    Declaration

    Objective-C

    - (void)registerEmail:(nonnull NSString *)email
                 password:(nonnull NSString *)password
               completion:
                   (nonnull RLMUsernamePasswordProviderClientOptionalErrorBlock)
                       completionHandler;

    Parameters

    email

    The email address of the user to register.

    password

    The password that the user created for the new username/password identity.

    completionHandler

    A callback to be invoked once the call is complete.

  • Confirms an email identity with the username/password provider.

    Declaration

    Objective-C

    - (void)confirmUser:(nonnull NSString *)token
                tokenId:(nonnull NSString *)tokenId
             completion:
                 (nonnull RLMUsernamePasswordProviderClientOptionalErrorBlock)
                     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
                              RLMUsernamePasswordProviderClientOptionalErrorBlock)
                             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
                             RLMUsernamePasswordProviderClientOptionalErrorBlock)
                            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 RLMUsernamePasswordProviderClientOptionalErrorBlock)
                         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
                                RLMUsernamePasswordProviderClientOptionalErrorBlock)
                               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.