@@ -13,7 +13,7 @@ export function handleGetFlowError<S>(
1313 // @ts -expect-error - response.data type is not properly typed in axios
1414 switch ( err . response ?. data . error ?. id ) {
1515 case 'session_inactive' :
16- router . push ( `/auth/ login?return_to=${ window . location . href } ` )
16+ router . push ( `/login?return_to=${ window . location . href } ` )
1717 return
1818 case 'session_aal2_required' :
1919 // 2FA is enabled and enforced, but user did not perform 2fa yet!
@@ -28,7 +28,7 @@ export function handleGetFlowError<S>(
2828 window . location . href = redirectTo . toString ( )
2929 return
3030 }
31- router . push ( `/auth/ login?aal=aal2&return_to=${ window . location . href } ` )
31+ router . push ( `/login?aal=aal2&return_to=${ window . location . href } ` )
3232 return
3333 case 'session_already_available' :
3434 // User is already signed in, let's redirect them home!
@@ -43,24 +43,24 @@ export function handleGetFlowError<S>(
4343 // The flow expired, let's request a new one.
4444 toast . error ( 'The return_to address is not allowed.' )
4545 resetFlow ( undefined )
46- router . push ( `/auth/ ${ flowType } ` )
46+ router . push ( `/${ flowType } ` )
4747 return
4848 case 'self_service_flow_expired' :
4949 // The flow expired, let's request a new one.
5050 toast . error ( 'Your interaction expired, please fill out the form again.' )
5151 resetFlow ( undefined )
52- router . push ( `/auth/ ${ flowType } ` )
52+ router . push ( `/${ flowType } ` )
5353 return
5454 case 'security_csrf_violation' :
5555 // A CSRF violation occurred. Best to just refresh the flow!
5656 toast . error ( 'A security violation was detected, please fill out the form again.' )
5757 resetFlow ( undefined )
58- router . push ( `/auth/ ${ flowType } ` )
58+ router . push ( `/${ flowType } ` )
5959 return
6060 case 'security_identity_mismatch' :
6161 // The requested item was intended for someone else. Let's request a new flow...
6262 resetFlow ( undefined )
63- router . push ( `/auth/ ${ flowType } ` )
63+ router . push ( `/${ flowType } ` )
6464 return
6565 case 'browser_location_change_required' :
6666 // Ory Kratos asked us to point the user to this URL.
@@ -75,7 +75,7 @@ export function handleGetFlowError<S>(
7575 case 410 :
7676 // The flow expired, let's request a new one.
7777 resetFlow ( undefined )
78- router . push ( `/auth/ ${ flowType } ` )
78+ router . push ( `/${ flowType } ` )
7979 return
8080 default :
8181 // Otherwise, we nothitng - the error will be handled by the Flow component
0 commit comments