Documentation / zerotal / auth / PASSWORDS
Variable: PASSWORDS
constPASSWORDS:object
Defined in: packages/auth/src/PasswordBroker.ts:21
Typed result constants returned by PasswordBroker.
Type Declaration
SENT
readonlySENT:"passwords.sent"="passwords.sent"
Token sent successfully.
TOKEN
readonlyTOKEN:"passwords.token"="passwords.token"
Token invalid, expired, or not found.
RESET
readonlyRESET:"passwords.reset"="passwords.reset"
Password reset successfully.
Example
import { PasswordBroker, PASSWORDS } from '@zerotal/auth';
const result = await broker.reset(token, email, newPassword);
if (result === PASSWORDS.RESET) { ... }
if (result === PASSWORDS.TOKEN) { ... }