Skip to main content

Forgot Password

Display Forgot Password form

mimeeqAuth.mountForgotPassword()

warning

This method is deprecated. Please use mmq-auth component instead.

This method renders forgot password form in Mimeeq modal. This functionality requires available element in the DOM that contains data-mimeeq-forgot-password attribute to render within it.

Parameters

NameTypeDefaultDescription
onSubmitfunctionenCallback when user successfully triggers the recovery process.
localestringenCountry Code

Usage

<div data-mimeeq-forgot-password></div>
<script>
document.addEventListener('mimeeq-auth-loaded', () => {
mimeeqAuth.mountForgotPassword({
onSubmit: () => {},
});
});
</script>

Start password recovery procedure

mimeeqAuth.authorization.forgotPassword(email)

This method executes forgot password procedure by sending email to the customer containing verification code and fallback URL to set the new password within the application.

Parameters

NameTypeDefaultDescription
emailstring (required)Username or email

Response

Mimeeq returns to { success: true } when the password has been updated successfully. In case of errors, you will receive self-explaining message about the issue alongside with error code.

Submit new password

mimeeqAuth.authorization.forgotPasswordSubmit(email, password, code)

When your user already have verification code, he can provide it along with new password that should be set.

Parameters

NameTypeDefaultDescription
emailstring (required)Username or email
passwordstring (required)New password that will be set for the user
codestring (required)Verification code from the email triggered by forgotPassword method

Response

Mimeeq returns to { success: true } when the password has been updated successfully. In case of errors, you will receive self-explaining message about the issue alongside with error code.