Prompts the current site visitor with a password reset modal.
promptForgotPassword()
returns a Promise that resolves when
the visitor submits the Create New Password form.
If the visitor cancels the form without submitting it, the Promise is rejected.
promptForgotPassword()
can't be called before the page is ready.
Notes:
The frontend Members APIs aren't fully functional when previewing a site. View a published version of a site to see their complete functionality.
The frontend Member APIs can only be used once the page has loaded. Therefore,
you must use them in code that's contained in or is called from the
onReady()
or any element event.
If you return
or await
promptForgotPassword()
when calling from onReady()
, the page is prevented from loading.
To handle the resolved promise, use .then()
and .catch()
.