Recover Password

To start the password recovery process for an existing user account, the accounts.recover_password() method can be called from your component:


import joystick, { accounts } from '@joystick.js/ui';

const RecoverPassword = joystick.component({
  events: {
    'submit form': (event = {}) => {
      }).then(() => {
        window.alert(`Check your email address at ${} for a reset link!`);
  render: () => {
    return `
      <div class="recover-password">
          <label>Email Address</label>
          <input type="email" name="email_address" placeholder="Email Address" />
          <button type="submit">Recover Password</button>

export default RecoverPassword;

Above, we listen for a submit event on our <form></form> element, calling to accounts.recover_password() to start the password recovery process for an existing user. Because we expect accounts.recover_password() to return a Promise, we use a .then() callback if the request is successful, alerting the user to check their email for a reset link.

API Reference


Function API

Function API

accounts.recover_password(options: object) => Promise;


  • options object

    An object defining the parameters for the existing user account.

    • email_address string Required

      A string defining the email address for the existing user account.

On This Page