feat(login): retry a typed repeater or room password on timeout - #444
Merged
Merged
Conversation
A password typed into the sign-in form got a single attempt, so a node at the edge of range needed the user to resubmit by hand. It now gets the same bounded cycle a remembered credential does: three attempts, the last one flooding. A mistyped password is silence on the wire too, so it now takes the whole cycle to fail.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A password typed into the repeater or room server sign-in form got one attempt. A node at the edge of range often drops that one packet, so the user had to resubmit by hand until one got through. A remembered credential already got a bounded cycle of
LOGIN_ATTEMPTS(3) with a 3 s backoff, where the last attempt resets the stored route and floods.signIninuseRepeaterAutoLoginnow runs that same cycle. Repeaters and room servers share the hook andRepeaterLoginGate, so both change together. The Retry / Reset route and retry buttons on a failed remembered credential still send one attempt, because the user is choosing to try again.Trade-off: a wrong password and an out-of-range node look the same on the wire (the node stays silent), so a mistyped password now takes the whole cycle, about half a minute, to fail. Its last attempt also resets the node's stored route to flood, and with no reply there is nothing to learn a new route from. That reset is kept on purpose: it is what reaches a node whose stored route went stale, and the companion firmware floods a login only when the contact has no path. A rejection the radio reports still ends the cycle at once, and a typed password is still never remembered unless it succeeds.
Verified on hardware (
npm run dev, USB companion):Signing in… (1 of 3)where it used to showLogging in…(screenshots below).Issues
None
Type of Change
!-- Breaking change (fix or feature that would cause existingfunctionality to change)
feat-- New feature (non-breaking change which adds functionality)fix-- Bug fix (non-breaking change which fixes an issue)docs-- Additional or updated documentationstyle-- Code style changes (formatting, missing semi colons, etc)refactor-- Code refactorperf-- Performance improvementtest-- Tests (adding or updating tests)build-- Build system or external dependencies changesci-- Build configuration changechore-- Grunt tasksrevert-- Revert previous changes