Repository navigation
1.10.1
Fixed
-
A sign-in that a gated link bounced now returns to the link with its query.
EnsureAuthenticatedoverroderedirectTarget, which receives the matched location without its query, so the intended url it recorded dropped a?token=..., and a signed-out phone opening a device approval link came back to an empty code field. It now overridesredirectTargetFor, records the full uri (?code=ABCincluded) throughMagicRouter.setIntendedUrl, and still matches the login route and the guest-only auth routes on the path alone. Themagicfloor rises to^1.4.0, the release that adds the hook. A host subclass that overroderedirectTargetonEnsureAuthenticatedis no longer reached and has to overrideredirectTargetFor.pubspec.yaml,lib/src/middleware/ensure_authenticated.dart,test/middleware/ensure_authenticated_test.dart,doc/basics/middleware.md,doc/basics/device-code-sign-in.md,doc/getting-started/installation.md,README.md,llms.txt,skills/magic-starter/ -
An identity prompt opened to approve one TV code can no longer approve another. Once the approve screen reopened on a new
?code=, a step-up prompt left open for the earlier code sent its proof with the new code. The prompt now closes when the visit changes, and a proof given after the code or the visit moved is never sent.lib/src/ui/views/auth/magic_starter_device_approve_view.dart,test/ui/views/auth/magic_starter_device_approve_view_test.dart -
A countdown listener that cancels or restarts the TV sign-in no longer leaves the old flow running.
remainingnotifies synchronously, so a listener that cancelled on the first value left a ticker started after the cancel, and one that restarted on a tick let the old tick poll with the cleared code and leave the new flow never polling. The controller reads its epoch again after each publish.lib/src/http/controllers/magic_starter_device_code_controller.dart,test/http/controllers/magic_starter_device_code_controller_test.dart -
The TV code screen now fits a 1280 by 720 television, and no longer overflows a narrow guest card. On a TV host's guest layout (a logo header and overscan above a 640 wide card) "Continue as Guest" was clipped below the bottom edge. On a window under 800 high the screen now draws the QR at
w-32in ap-2frame, the code attext-3xl, the address attext-baseand tighter gaps, so the title, the QR, the code, the address, the countdown and both actions fit; the guest layout's scroll covers a host that leaves even less. The QR went beside the code frommdup, a breakpoint that reads the window, so in the package's own 480 wide guest card on a wide window the row overflowed to the right; the arrangement is now measured on the card (beside from 400 wide, stacked below), and the text column beside the QR wraps rather than overflows.lib/src/ui/views/auth/magic_starter_device_code_view.dart,test/ui/views/auth/magic_starter_device_code_view_test.dart,doc/basics/device-code-sign-in.md -
The TV countdown no longer repaints the whole screen every second. Each tick called
refreshUI(), which rebuilt the view and the QR code with it. The ticks now go through the newMagicStarterDeviceCodeController.remaining(ValueListenable<int>) and only the countdown text listens;secondsRemainingstill reads the value. A host's ownauth.device_codeview that readsecondsRemaininginbuildhas to listen toremainingfor its countdown to move.lib/src/http/controllers/magic_starter_device_code_controller.dart,lib/src/ui/views/auth/magic_starter_device_code_view.dart,test/ui/views/auth/magic_starter_device_code_view_test.dart,doc/basics/device-code-sign-in.md -
A throttled lookup, approval or denial on the approve screen now says to wait instead of blaming the connection. A
429showed "Something went wrong. Check the connection and try again."; it now shows the newmagic_starter.device_approve.throttledstring, "Too many attempts. Wait a minute and try again.", and the screen stays retryable as before. An app installed earlier merges the key into its own lang files fromassets/stubs/install/en.stub.lib/src/http/controllers/magic_starter_device_approve_controller.dart,assets/stubs/install/en.stub,test/http/controllers/magic_starter_device_approve_controller_test.dart,doc/basics/device-code-sign-in.md -
Opening the approve screen again on the same route starts over instead of showing the last visit's result. The view opened its controller once per mount, and a move that only changes the route's query rebuilds the page rather than remounting it, so after an approval a visit without a code still showed "Approved". The view now opens again whenever the route location changes; a code it carries is still only looked up, never approved, and a theme or window change keeps the visit.
lib/src/ui/views/auth/magic_starter_device_approve_view.dart,test/ui/views/auth/magic_starter_device_approve_view_test.dart,doc/basics/device-code-sign-in.md