Skip to content

Commit e779885

Browse files
author
Ravi Singh
committed
fix: in-app QR scanner redirects to LinkDevice for proper claim flow
1 parent 56c8315 commit e779885

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

pwa/client/src/pages/SetupWizard.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,8 @@ export default function SetupWizard() {
6767

6868
if (id && token && ip) {
6969
stopScan();
70-
// Claim directly via API
71-
api.post('/api/link/claim', { device_id: id, token, receiver_ip: ip })
72-
.then(() => setStep(STEPS.length - 1))
73-
.catch(err => { setError(err.message); });
70+
// Redirect to LinkDevice page which handles the full claim flow
71+
window.location.href = `/link?id=${id}&token=${token}&ip=${ip}`;
7472
}
7573
} catch {} // Not a valid URL — keep scanning
7674
}

0 commit comments

Comments
 (0)