How to use the @accounts/common.validators.validateEmail function in @accounts/common

To help you get started, we’ve selected a few @accounts/common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github accounts-js / accounts / packages / client / src / AccountsClient.js View on Github external
async requestVerificationEmail(email: string): Promise {
    if (!validators.validateEmail(email)) throw new AccountsError('Valid email must be provided');
    try {
      await this.transport.sendVerificationEmail(email);
    } catch (err) {
      throw new AccountsError(err.message);
    }
  }
}
github accounts-js / accounts / packages / client / src / AccountsClient.js View on Github external
async requestPasswordReset(email: string): Promise {
    if (!validators.validateEmail(email)) throw new AccountsError('Valid email must be provided');
    try {
      await this.transport.sendResetPasswordEmail(email);
    } catch (err) {
      throw new AccountsError(err.message);
    }
  }

@accounts/common

Fullstack authentication and accounts-management

MIT
Latest version published 7 years ago

Package Health Score

54 / 100
Full package analysis