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:
2026-11-23 14:46:29 +03:00
parent 78192b742d
commit b0ffbd318a
17 changed files with 271 additions and 120 deletions

View File

@@ -272,6 +272,12 @@ class RegistrationCubitV2 extends Cubit<RegistrationStateV2> {
}
}
}
final passwordErrors = errors?['password'] as List<dynamic>?;
if (passwordErrors != null && passwordErrors.isNotEmpty) {
for (var error in passwordErrors) {
allErrors.add(error.toString());
}
}
// Сохраняем все ошибки для отображения в диалоге
if (allErrors.isNotEmpty) {