a tool for shared writing and social publishing

use window.href to redirect in oauth error

+1 -3
+1 -3
components/OAuthError.tsx
··· 1 1 "use client"; 2 2 3 3 import { OAuthSessionError } from "src/atproto-oauth"; 4 - import { usePathname } from "next/navigation"; 5 4 6 5 export function OAuthErrorMessage({ 7 6 error, ··· 10 9 error: OAuthSessionError; 11 10 className?: string; 12 11 }) { 13 - const pathname = usePathname(); 14 - const signInUrl = `/api/oauth/login?redirect_url=${encodeURIComponent(pathname)}${error.did ? `&handle=${encodeURIComponent(error.did)}` : ""}`; 12 + const signInUrl = `/api/oauth/login?redirect_url=${encodeURIComponent(window.location.href)}${error.did ? `&handle=${encodeURIComponent(error.did)}` : ""}`; 15 13 16 14 return ( 17 15 <div className={className}>