Skip to content

Commit 9e4fe76

Browse files
committed
Diagnostics app: Support endpoint URL parameter
1 parent 3f8f3f6 commit 9e4fe76

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tools/diagnostics-app/src/routes/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import React from 'react';
1313
import { useInitError } from '@/components/providers/SystemProvider';
1414

1515
const searchSchema = z.object({
16-
token: z.string().optional()
16+
token: z.string().optional(),
17+
endpoint: z.string().optional()
1718
});
1819

1920
type LoginFormValues = {
@@ -26,7 +27,7 @@ export const Route = createFileRoute('/')({
2627
beforeLoad: async ({ search }) => {
2728
// Handle deep-link auto-sign-in with ?token= query param
2829
if (search.token) {
29-
const endpoint = getTokenEndpoint(search.token);
30+
const endpoint = search.endpoint ?? getTokenEndpoint(search.token);
3031
if (!endpoint) {
3132
throw new Error('endpoint is required');
3233
}

0 commit comments

Comments
 (0)