FEAT: reset password

This commit is contained in:
Arthur Simas
2022-05-27 18:57:05 -03:00
parent c25d2427c2
commit c920eb27b9
5 changed files with 103 additions and 20 deletions
+4 -2
View File
@@ -1,4 +1,4 @@
export const Auth = {
export const AUTH = {
UNAUTHORIZED: 'AUTH.UNAUTHORIZED',
FORBIDDEN: 'AUTH.FORBIDDEN',
WRONG_CREDENTIALS: 'AUTH.WRONG_CREDENTIALS',
@@ -9,13 +9,15 @@ export const Auth = {
TOTP_REQUIRED: 'AUTH.TOTP_REQUIRED',
CODE_MISMATCH: 'AUTH.CODE_MISMATCH',
CODE_ALREADY_USED: 'AUTH.CODE_ALREADY_USED',
RESET_PASSWORD_CODE_EXPIRED: 'AUTH.RESET_PASSWORD_CODE_EXPIRED',
WEAK_NEW_PASSWORD: 'AUTH.WEAK_NEW_PASSWORD',
};
const ErrorCodes = {
UNKNOWN: 'UNKNOWN',
RATE_LIMIT: 'RATE_LIMIT',
AUTH: Auth,
INTERNAL: 'INTERNAL',
AUTH,
};
export default ErrorCodes;