Skip to content

Commit f06ac7d

Browse files
author
Ravi Singh
committed
fix: in-app QR scanner handles new /claim URL format
1 parent 2020dce commit f06ac7d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

pwa/client/src/pages/SetupWizard.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,17 @@ export default function SetupWizard() {
6161
if (code && code.data) {
6262
try {
6363
const parsed = new URL(code.data);
64+
// New format: http://<ip>/claim — open directly (receiver handles redirect)
65+
if (parsed.pathname === '/claim') {
66+
stopScan();
67+
window.location.href = code.data;
68+
}
69+
// Old format: https://cloud/link?id=...&token=...&ip=...
6470
const id = parsed.searchParams.get('id');
6571
const token = parsed.searchParams.get('token');
6672
const ip = parsed.searchParams.get('ip');
67-
6873
if (id && token && ip) {
6974
stopScan();
70-
// Redirect to LinkDevice page which handles the full claim flow
7175
window.location.href = `/link?id=${id}&token=${token}&ip=${ip}`;
7276
}
7377
} catch {} // Not a valid URL — keep scanning

0 commit comments

Comments
 (0)