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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user