Realm.Auth.EmailPasswordAuth

Class for managing email/password for users

callResetPasswordFunction(resetDetails, args)Promise<void>

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

Parameters:
  • resetDetails
    • 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>
callResetPasswordFunction(email, password, args)Promise<void>
Deprecated: Use `callResetPasswordFunction(resetDetails, ...args)` instead

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

Parameters:
  • 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(tokenDetails)Promise<void>

Confirms an email identity with the email/password provider.

Parameters:
  • tokenDetails
    • 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>
confirmUser(token, id)Promise<void>
Deprecated: Use `confirmUser(tokenDetails)` instead

Confirms an email identity with the email/password provider.

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

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

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

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

Parameters:
  • userDetails
    • 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>
registerUser(email, password)Promise<void>
Deprecated: Use `registerUser(userDetails)` instead

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

Parameters:
  • 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(emailDetails)Promise<void>

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

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

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

Returns: Promise<void>
resendConfirmationEmail(email)Promise<void>
Deprecated: Use `resendConfirmationEmail(emailDetails)` instead

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

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

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

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

Parameters:
  • resetDetails
    • 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>
resetPassword(password, token, id)Promise<void>
Deprecated: Use `resetPassword(resetDetails)` instead

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

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

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

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

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

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

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

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

Returns: Promise<void>
retryCustomConfirmation(email)Promise<void>
Deprecated: Use `retryCustomConfirmation(emailDetails)` instead

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

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

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

Sends an email to the user for resetting the password.

Parameters:
  • emailDetails
    • 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>
sendResetPasswordEmail(email)Promise<void>
Deprecated: Use `sendResetPasswordEmail(emailDetails)` instead

Sends an email to the user for resetting the password.

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

Returns: Promise<void>