···45function AuthCompleteContent() {
6 useEffect(() => {
7- // Get the raw search string from the URL
8- const searchString = window.location.search;
00910- // Construct the redirect URL with the raw search string
11- const redirectUrl = `atprotobackups://auth${searchString}`;
12- console.log("Redirecting to:", redirectUrl); // Debug log
0000000000001314 // Open the URL in the system's default handler
15 window.location.href = redirectUrl;
···25 <p className="mt-2 text-sm text-gray-600">
26 Redirecting you back to the application...
27 </p>
00000028 </div>
29 </div>
30 </div>
···45function AuthCompleteContent() {
6 useEffect(() => {
7+ // Debug logging
8+ console.log("Current URL:", window.location.href);
9+ console.log("Search string:", window.location.search);
10+ console.log("Hash:", window.location.hash);
1112+ // Get all parameters from the URL
13+ const currentUrl = new URL(window.location.href);
14+ const params = new URLSearchParams(currentUrl.search);
15+16+ // Debug log all parameters
17+ console.log("All parameters:");
18+ params.forEach((value, key) => {
19+ console.log(key, "=", value);
20+ });
21+22+ // Construct the redirect URL preserving all parameters
23+ const redirectUrl = `atprotobackups://auth${
24+ currentUrl.search || "?" + currentUrl.hash.slice(1)
25+ }`;
26+ console.log("Redirecting to:", redirectUrl);
2728 // Open the URL in the system's default handler
29 window.location.href = redirectUrl;
···39 <p className="mt-2 text-sm text-gray-600">
40 Redirecting you back to the application...
41 </p>
42+ <pre
43+ id="debug"
44+ className="mt-4 text-left text-xs text-gray-500 bg-gray-100 p-2 rounded"
45+ >
46+ Checking URL parameters...
47+ </pre>
48 </div>
49 </div>
50 </div>