Skip to content

Commit fb76ae3

Browse files
committed
Merge branch 'main' of github.com:boundlessfi/boundless into production
2 parents cc833ff + f56a80f commit fb76ae3

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

app/(landing)/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Metadata } from 'next';
22
import { ReactNode } from 'react';
33
import { Footer, Navbar } from '@/components/landing-page';
44
import { generatePageMetadata } from '@/lib/metadata';
5-
import { GoogleOneTap } from '@/components/auth/GoogleOneTap';
5+
// import { GoogleOneTap } from '@/components/auth/GoogleOneTap';
66
import { LandingWalletWrapper } from '@/components/wallet/LandingWalletWrapper';
77

88
export 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
);

components/auth/LoginWrapper.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)