File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
app/[locale]/(auth)/account/signin Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,7 @@ const Page = () => {
4949 const getCallbackUrl = ( ) => {
5050 const callbackUrl =
5151 new URL ( location . href ) . searchParams . get ( 'callbackUrl' ) || '/' ;
52-
53- const url = new URL ( callbackUrl || '/' ) ;
52+ const url = new URL ( callbackUrl , window . location . origin ) ;
5453 return url . pathname + url . search + url . hash ;
5554 } ;
5655
Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ const TopSection: FC = () => {
5252
5353 const pathname = usePathname ( ) ;
5454 const searchParams = useSearchParams ( ) ;
55- const callbackUrl = `${ pathname } ?${ searchParams . toString ( ) } ` ;
55+ const callbackUrl = `${ pathname } ${
56+ searchParams . toString ( ) ? `?${ searchParams . toString ( ) } ` : ''
57+ } `;
5658
5759 return (
5860 < >
You can’t perform that action at this time.
0 commit comments