Skip to main content

Type Alias: ForgotPasswordSubmit()

ForgotPasswordSubmit = (email, password, code) => Promise<SuccessResponse | AuthError>

Completes the password recovery process by setting a new password with the verification code. After receiving the code from forgotPassword, the user can use this method to set a new password.

Parameters

email

string

Email address of the user account

password

string

New password to set

code

string

Verification code received via email

Returns

Promise<SuccessResponse | AuthError>

A promise resolving to a success response or error information

Example

window.mimeeqAuth.authorization.forgotPasswordSubmit(
'[email protected]',
'newSecurePassword123',
'123456'
).then(response => {
if (response.success) {
console.log('Password changed successfully!');
// Redirect to login page
} else {
console.error('Failed to reset password');
}
});