forked from eatvio/eatvio_app
feat(auth): align password policy and handle 429 responses
- map 429 Retry-After to a localized toast in AuthCubit - enforce the 8-character minimum on registration v1 and add the hint - surface errors.password in registration v2 - show password errors from 422 responses in the reset flow - add ru/en localization strings and regenerate l10n - add a regression test for the 429/Retry-After path
This commit is contained in:
@@ -529,16 +529,46 @@ class S {
|
||||
);
|
||||
}
|
||||
|
||||
/// `В пароле должно быть минимум 6 символов`
|
||||
/// `В пароле должно быть минимум 8 символов`
|
||||
String get password_short {
|
||||
return Intl.message(
|
||||
'В пароле должно быть минимум 6 символов',
|
||||
'В пароле должно быть минимум 8 символов',
|
||||
name: 'password_short',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `At least 8 characters, avoid common passwords`
|
||||
String get password_hint {
|
||||
return Intl.message(
|
||||
'At least 8 characters, avoid common passwords',
|
||||
name: 'password_hint',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Too many login attempts. Try again in {seconds} sec.`
|
||||
String too_many_login_attempts(int seconds) {
|
||||
return Intl.message(
|
||||
'Too many login attempts. Try again in $seconds sec.',
|
||||
name: 'too_many_login_attempts',
|
||||
desc: '',
|
||||
args: [seconds],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Too many login attempts. Please try again later.`
|
||||
String get too_many_login_attempts_no_retry {
|
||||
return Intl.message(
|
||||
'Too many login attempts. Please try again later.',
|
||||
name: 'too_many_login_attempts_no_retry',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Имя пользователя обязательно для заполнения`
|
||||
String get name_empty {
|
||||
return Intl.message(
|
||||
|
||||
Reference in New Issue
Block a user