File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { Metadata } from 'next';
22import { ReactNode } from 'react' ;
33import { Footer , Navbar } from '@/components/landing-page' ;
44import { generatePageMetadata } from '@/lib/metadata' ;
5- import { GoogleOneTap } from '@/components/auth/GoogleOneTap' ;
5+ // import { GoogleOneTap } from '@/components/auth/GoogleOneTap';
66import { LandingWalletWrapper } from '@/components/wallet/LandingWalletWrapper' ;
77
88export const metadata : Metadata = generatePageMetadata ( 'home' ) ;
@@ -17,7 +17,7 @@ export default function LandingLayout({ children }: LandingLayoutProps) {
1717 < Navbar />
1818 < main className = 'flex-1' > { children } </ main >
1919 < Footer />
20- < GoogleOneTap />
20+ { /* <GoogleOneTap /> */ }
2121 < LandingWalletWrapper />
2222 </ div >
2323 ) ;
Original file line number Diff line number Diff line change @@ -35,10 +35,24 @@ const LoginWrapper = ({ setLoadingState }: LoginWrapperProps) => {
3535 const [ lastMethod , setLastMethod ] = useState < string | null > ( null ) ;
3636 const [ twoFactorRequired , setTwoFactorRequired ] = useState ( false ) ;
3737
38- const callbackUrl = searchParams . get ( 'callbackUrl' )
38+ const rawCallbackUrl = searchParams . get ( 'callbackUrl' )
3939 ? decodeURIComponent ( searchParams . get ( 'callbackUrl' ) ! )
4040 : process . env . NEXT_PUBLIC_APP_URL || '/' ;
4141
42+ const appOrigin =
43+ typeof window !== 'undefined'
44+ ? window . location . origin
45+ : ( process . env . NEXT_PUBLIC_APP_URL || 'https://boundlessfi.xyz' ) . replace (
46+ / \/ $ / ,
47+ ''
48+ ) ;
49+
50+ const callbackUrl =
51+ rawCallbackUrl . startsWith ( 'http://' ) ||
52+ rawCallbackUrl . startsWith ( 'https://' )
53+ ? rawCallbackUrl
54+ : `${ appOrigin } ${ rawCallbackUrl . startsWith ( '/' ) ? '' : '/' } ${ rawCallbackUrl } ` ;
55+
4256 useEffect ( ( ) => {
4357 const method = authClient . getLastUsedLoginMethod ( ) ;
4458 setLastMethod ( method ) ;
You can’t perform that action at this time.
0 commit comments