mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
f65afff6c1
We'll store hashes for the last 5 passwords, fetch them all for the user wanting to change their password, and make sure the password does not verify against any of the 5 stored hashes. Includes some password-related UI/UX improvements and refactors. Also some fixes related to reset password rate limiting (instead of an unhandled exception), and token expiration on error. --------- Co-authored-by: Nuno Góis <github@nunogois.com>
12 lines
287 B
TypeScript
12 lines
287 B
TypeScript
import { UnleashError } from './unleash-error';
|
|
|
|
export class PasswordPreviouslyUsedError extends UnleashError {
|
|
statusCode = 400;
|
|
|
|
constructor(
|
|
message: string = `You've previously used this password. Please use a new password.`,
|
|
) {
|
|
super(message);
|
|
}
|
|
}
|