Repository navigation
Redirect to the page the UI has for an adopted device - #99
Conversation
The sign-in callback sent a user who adopts a device that another account owns to /already-adopted. The UI serves that page at /devices/already-adopted, so the user got the not-found page.
|
No actionable comments were generated in the recent review. Walkthrough
Change: Bug fix Merge Risk:
|
Problem
A user signs in to adopt a device that another account has registered. The user lands on
https://app.jetkvm.com/already-adoptedand sees the "Not found" page. The user gets no explanation of why the adoption failed.Cause
The sign-in callback in
src/oidc.tsredirects this case to/already-adopted. The UI serves the "Device Already Registered" page at/devices/already-adopted. Both paths date from the first release of each repo, so this redirect has never reached the page.Fix
The callback now redirects to
/devices/already-adopted. The UI path follows its otherdevices/*routes, so the redirect is the side to change. The fix needs no UI release.Testing
I loaded both paths on
app.jetkvm.com(UI 0.5.11) in headless Chromium:/already-adopted/devices/already-adoptedI did not exercise the sign-in callback itself, because that needs a Google session and a device registered to a second account. The change adds no test.
Note
Low Risk
Single redirect URL change on an error path; no auth, data, or adoption logic changes.
Overview
When Google sign-in runs during device adoption and the device is already registered to another account, the OIDC callback used to send users to
/already-adopted, which the app does not serve (404). The redirect is now/devices/already-adopted, matching the existing UI route that shows the “Device Already Registered” message.No UI or other backend changes are required for this behavior fix.
Reviewed by Cursor Bugbot for commit c47eec9. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit