File tree Expand file tree Collapse file tree 8 files changed +7
-20
lines changed Expand file tree Collapse file tree 8 files changed +7
-20
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ interface InternalEnv {
18
18
readonly PUBLIC_CLERK_SIGN_UP_URL ?: string ;
19
19
readonly PUBLIC_CLERK_TELEMETRY_DISABLED ?: string ;
20
20
readonly PUBLIC_CLERK_TELEMETRY_DEBUG ?: string ;
21
- readonly PUBLIC_CLERK_TREAT_PENDING_AS_SIGNED_OUT ?: string ;
22
21
}
23
22
24
23
interface ImportMeta {
Original file line number Diff line number Diff line change @@ -65,7 +65,6 @@ function createIntegration<Params extends HotloadAstroClerkIntegrationParams>()
65
65
/**
66
66
* Convert the integration params to environment variable in order for it to be readable from the server
67
67
*/
68
- ...buildEnvVarFromOption ( treatPendingAsSignedOut , 'PUBLIC_CLERK_TREAT_PENDING_AS_SIGNED_OUT' ) ,
69
68
...buildEnvVarFromOption ( signInUrl , 'PUBLIC_CLERK_SIGN_IN_URL' ) ,
70
69
...buildEnvVarFromOption ( signUpUrl , 'PUBLIC_CLERK_SIGN_UP_URL' ) ,
71
70
...buildEnvVarFromOption ( isSatellite , 'PUBLIC_CLERK_IS_SATELLITE' ) ,
Original file line number Diff line number Diff line change @@ -117,11 +117,7 @@ export const useAuth: UseAuth = ({ treatPendingAsSignedOut } = {}) => {
117
117
has,
118
118
} ,
119
119
options : {
120
- treatPendingAsSignedOut :
121
- // Fallback from option provided via SSR / CSR contexts
122
- treatPendingAsSignedOut ??
123
- clerkContext ?. __internal_getOption ?.( 'treatPendingAsSignedOut' ) ??
124
- import . meta. env . PUBLIC_CLERK_TREAT_PENDING_AS_SIGNED_OUT ,
120
+ treatPendingAsSignedOut,
125
121
} ,
126
122
} ) ;
127
123
Original file line number Diff line number Diff line change @@ -188,7 +188,6 @@ const defaultOptions: ClerkOptions = {
188
188
signUpFallbackRedirectUrl : undefined ,
189
189
signInForceRedirectUrl : undefined ,
190
190
signUpForceRedirectUrl : undefined ,
191
- treatPendingAsSignedOut : true ,
192
191
newSubscriptionRedirectUrl : undefined ,
193
192
} ;
194
193
@@ -358,10 +357,8 @@ export class Clerk implements ClerkInterface {
358
357
}
359
358
360
359
get isSignedIn ( ) : boolean {
361
- const { treatPendingAsSignedOut } = this . #options;
362
-
363
360
const hasPendingSession = this ?. session ?. status === 'pending' ;
364
- if ( treatPendingAsSignedOut && hasPendingSession ) {
361
+ if ( hasPendingSession ) {
365
362
return false ;
366
363
}
367
364
Original file line number Diff line number Diff line change @@ -118,8 +118,7 @@ export const useAuth = (initialAuthStateOrOptions: UseAuthOptions = {}): UseAuth
118
118
signOut,
119
119
} ,
120
120
{
121
- treatPendingAsSignedOut :
122
- treatPendingAsSignedOut ?? isomorphicClerk . __internal_getOption ?.( 'treatPendingAsSignedOut' ) ,
121
+ treatPendingAsSignedOut,
123
122
} ,
124
123
) ;
125
124
} ;
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ import type {
49
49
SignUpFallbackRedirectUrl ,
50
50
SignUpForceRedirectUrl ,
51
51
} from './redirects' ;
52
- import type { PendingSessionOptions , SessionTask , SignedInSessionResource } from './session' ;
52
+ import type { SessionTask , SignedInSessionResource } from './session' ;
53
53
import type { SessionVerificationLevel } from './sessionVerification' ;
54
54
import type { SignInResource } from './signIn' ;
55
55
import type { SignUpResource } from './signUp' ;
@@ -953,8 +953,7 @@ type ClerkOptionsNavigation =
953
953
routerDebug ?: boolean ;
954
954
} ;
955
955
956
- export type ClerkOptions = PendingSessionOptions &
957
- ClerkOptionsNavigation &
956
+ export type ClerkOptions = ClerkOptionsNavigation &
958
957
SignInForceRedirectUrl &
959
958
SignInFallbackRedirectUrl &
960
959
SignUpForceRedirectUrl &
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ type UseAuth = (options?: PendingSessionOptions) => ToComputedRefs<UseAuthReturn
74
74
* </template>
75
75
*/
76
76
export const useAuth : UseAuth = ( options = { } ) => {
77
- const { clerk, authCtx, ... contextOptions } = useClerkContext ( ) ;
77
+ const { clerk, authCtx } = useClerkContext ( ) ;
78
78
79
79
const getToken : GetToken = createGetToken ( clerk ) ;
80
80
const signOut : SignOut = createSignOut ( clerk ) ;
@@ -100,7 +100,7 @@ export const useAuth: UseAuth = (options = {}) => {
100
100
has,
101
101
} ,
102
102
options : {
103
- treatPendingAsSignedOut : options . treatPendingAsSignedOut ?? contextOptions . treatPendingAsSignedOut ,
103
+ treatPendingAsSignedOut : options . treatPendingAsSignedOut ,
104
104
} ,
105
105
} ) ;
106
106
Original file line number Diff line number Diff line change @@ -118,8 +118,6 @@ export const clerkPlugin: Plugin<[PluginOptions]> = {
118
118
sessionCtx,
119
119
userCtx,
120
120
organizationCtx,
121
- treatPendingAsSignedOut :
122
- options . treatPendingAsSignedOut ?? clerk . value ?. __internal_getOption ?.( 'treatPendingAsSignedOut' ) ,
123
121
} ) ;
124
122
} ,
125
123
} ;
You can’t perform that action at this time.
0 commit comments