+6
-11
docs/app/auth/complete/page.tsx
+6
-11
docs/app/auth/complete/page.tsx
···
1
1
"use client";
2
2
3
3
import { useEffect, Suspense } from "react";
4
-
import { useSearchParams } from "next/navigation";
5
4
6
5
function AuthCompleteContent() {
7
-
const searchParams = useSearchParams();
8
-
9
6
useEffect(() => {
10
-
// Get all URL parameters
11
-
const params = new URLSearchParams();
12
-
searchParams.forEach((value, key) => {
13
-
params.append(key, value);
14
-
});
7
+
// Get the raw search string from the URL
8
+
const searchString = window.location.search;
15
9
16
-
// Construct the redirect URL with all parameters
17
-
const redirectUrl = `atprotobackups://auth?${params.toString()}`;
10
+
// Construct the redirect URL with the raw search string
11
+
const redirectUrl = `atprotobackups://auth${searchString}`;
12
+
console.log("Redirecting to:", redirectUrl); // Debug log
18
13
19
14
// Open the URL in the system's default handler
20
15
window.location.href = redirectUrl;
21
-
}, [searchParams]);
16
+
}, []);
22
17
23
18
return (
24
19
<div className="min-h-screen flex items-center justify-center bg-gray-50">