File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/clerk-js/src/ui/common Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,8 @@ export const withRedirectToSignInTask = <P extends AvailableComponentProps>(Comp
99
99
100
100
return withRedirect (
101
101
Component ,
102
- clerk => Boolean ( clerk . session ?. currentTask && signInCtx ?. taskUrl ) ,
102
+ ( clerk , environment ) =>
103
+ ! ! environment ?. authConfig . singleSessionMode && ! ! ( clerk . session ?. currentTask && signInCtx ?. taskUrl ) ,
103
104
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
104
105
( ) => signInCtx . taskUrl ! ,
105
106
undefined ,
@@ -120,7 +121,8 @@ export const withRedirectToSignUpTask = <P extends AvailableComponentProps>(Comp
120
121
121
122
return withRedirect (
122
123
Component ,
123
- clerk => Boolean ( clerk . session ?. currentTask && signUpCtx ?. taskUrl ) ,
124
+ ( clerk , environment ) =>
125
+ ! ! environment ?. authConfig . singleSessionMode && ! ! ( clerk . session ?. currentTask && signUpCtx ?. taskUrl ) ,
124
126
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
125
127
( ) => signUpCtx . taskUrl ! ,
126
128
undefined ,
You can’t perform that action at this time.
0 commit comments