Realm.Auth.EmailPasswordAuth

Class for managing email/password for users

callResetPasswordFunction(details, args)Promise<void>

Resets the password of an email identity using the password reset function set up in the application.

Parameters:
  • details
    • The email and password details to reset

      • email
        • Type: string
        • The email address of the user.

      • password
        • Type: string
        • The desired new password.

  • args repeatable
    • Type: [BSON, ...]
    • Arguments passed onto the function.

Returns: Promise<void>
confirmUser(details)Promise<void>

Confirms an email identity with the email/password provider.

Parameters:
  • details
    • Type: object
    • The received token and ID details

      • token
        • Type: string
        • The confirmation token that was emailed to the user.

      • tokenId
        • Type: string
        • The confirmation token id that was emailed to the user.

Returns: Promise<void>
registerUser(details)Promise<void>

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

Parameters:
  • details
    • Type: object
    • The new user's email and password details

      • email
        • Type: string
        • The email address of the user to register.

      • password
        • Type: string
        • The password that the user created for the new username/password identity.

Returns: Promise<void>
resendConfirmationEmail(details)Promise<void>

Re-sends a confirmation email to a user that has registered but not yet confirmed their email address.

Parameters:
  • details
    • Type: object
    • The associated email details

      • email
        • Type: string
        • The email address of the user to re-send a confirmation for.

Returns: Promise<void>
resetPassword(details)Promise<void>

Resets the password of an email identity using the password reset token emailed to a user.

Parameters:
  • details
    • Type: object
    • The token and password details for the reset

      • password
        • Type: string
        • The desired new password.

      • token
        • Type: string
        • The password reset token that was emailed to the user.

      • tokenId
        • Type: string
        • The password reset token id that was emailed to the user.

Returns: Promise<void>
retryCustomConfirmation(details)Promise<void>

Re-run the custom confirmation function for user that has registered but not yet confirmed their email address.

Parameters:
  • details
    • Type: object
    • The associated email details

      • email
        • Type: string
        • The email address of the user to re-run the confirmation for.

Returns: Promise<void>
sendResetPasswordEmail(details)Promise<void>

Sends an email to the user for resetting the password.

Parameters:
  • details
    • Type: object
    • The email details to send the reset to

      • email
        • Type: string
        • The email address of the user to re-send a confirmation for.

Returns: Promise<void>