File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { toast } from "sonner";
88function OAuthCallbackContent ( ) {
99 const router = useRouter ( ) ;
1010 const searchParams = useSearchParams ( ) ;
11- const returnUrl = searchParams . get ( "returnUrl" ) || "/protected " ;
11+ const returnUrl = searchParams . get ( "returnUrl" ) || "/" ;
1212
1313 useEffect ( ( ) => {
1414 const checkSession = async ( ) => {
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ function SignInForm() {
3232 } )
3333
3434 // Get the return URL from query parameters
35- const returnUrl = searchParams . get ( 'returnUrl' ) || '/protected '
35+ const returnUrl = searchParams . get ( 'returnUrl' ) || '/'
3636
3737 const handleInputChange = ( e : React . ChangeEvent < HTMLInputElement > ) => {
3838 const { name, value, type, checked } = e . target
@@ -79,7 +79,7 @@ function SignInForm() {
7979 provider : 'google' ,
8080 options : {
8181 redirectTo : typeof window !== "undefined"
82- ? `${ window . location . origin } /protected `
82+ ? `${ window . location . origin } /auth/callback?returnUrl= ${ encodeURIComponent ( returnUrl ) } `
8383 : undefined ,
8484 } ,
8585 } ) ;
You can’t perform that action at this time.
0 commit comments