From 125a65cc9ec3262c09929948c3860420776da17f Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Wed, 31 Dec 2025 18:43:51 -0500 Subject: [PATCH] use window.href to redirect in oauth error --- components/OAuthError.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/OAuthError.tsx b/components/OAuthError.tsx index e23a438a..32c79552 100644 --- a/components/OAuthError.tsx +++ b/components/OAuthError.tsx @@ -1,7 +1,6 @@ "use client"; import { OAuthSessionError } from "src/atproto-oauth"; -import { usePathname } from "next/navigation"; export function OAuthErrorMessage({ error, @@ -10,8 +9,7 @@ export function OAuthErrorMessage({ error: OAuthSessionError; className?: string; }) { - const pathname = usePathname(); - const signInUrl = `/api/oauth/login?redirect_url=${encodeURIComponent(pathname)}${error.did ? `&handle=${encodeURIComponent(error.did)}` : ""}`; + const signInUrl = `/api/oauth/login?redirect_url=${encodeURIComponent(window.location.href)}${error.did ? `&handle=${encodeURIComponent(error.did)}` : ""}`; return (
-- 2.51.2