Repository navigation
fix(auth): tell people when sign-in is rate limited - #9114
NotThatKindOfDrLiz merged 8 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
Mobile PR PreviewPreview refreshed for Last refresh:
|
|
Takeover update: I pushed
Verification on this head:
@dcadenas please review the takeover changes and merge when you are ready. @rabble and @hm21 remain the requested reviewers. |
NotThatKindOfDrLiz
left a comment
There was a problem hiding this comment.
Approved at f080fe4f2. The takeover fixes resolve the parsing duplication, centralize registration failure classification, remove the stale error-code documentation/coverage, and all required checks are green.
|
Overlap heads-up: this PR and #9113 both change DivineAuthCubit and DivineAuthState. Please coordinate merge order; whichever lands later should rebase onto fresh origin/main and verify rate-limit messaging remains intact after invite-code onboarding is removed. |
Description
A 429 during sign-in used to show the same generic "something went wrong" message as any other unrecognized failure, so there was no way to tell "wait and try again" apart from a real error. Sign-up had the same blind spot: a rate-limited registration collapsed into the generic registration failure, and an email that already had an account skipped the recovery options a key conflict gets.
This change classifies an HTTP 429 by status for sign-in and registration. Sign-in shows the existing
accountCredentialsRateLimitedcopy in all 22 locales instead of adding a new string, and a duplicate-email sign-up opens the same sign-in recovery as a key conflict. A wrong password and a non-existent account remain indistinguishable, so nothing here reveals whether an account exists. Change-password, change-email and key export already surface rate limits this way; sign-in was the outlier.Related Issue: Closes #8444
Inventory
Every user-facing Keycast-backed flow, what the client models today, and what stays intentionally generic. The audit was split out of #8432; the server-side attempt-limiting half remains tracked in
divinevideo/keycast#403.weak_passwordhas no Keycast producer today.error_description. Retry is the only action either way, and changing it would alter session-recovery semantics.Out of Scope
SignUpFailureReasonenum.divinevideo/keycast#403.success:false200 body with no machine code, while an invalid token is a 401.error_descriptionexposure, recorded in the inventory above.Verification
dart format --output=none --set-exit-if-changed lib test integration_test tools: clean (repo-wide).flutter analyze lib test integration_test tools: no issues (repo-wide, the CI analyze job).flutter analyzeandflutter testinmobile/packages/keycast_flutter: clean, 323 tests passed.flutter test test/blocs/divine_auth/ test/screens/auth/: 242 tests passed.Not run locally: the full Mobile CI test job, which is a sharded multi-command script. A plain run over
mobile/test/was stopped at a 900 second timeout under concurrent machine load, so the full-suite signal comes from CI. The generated-files ratchets and the package's coverage workflow are CI-only.Type of Change