@@ -75,7 +75,8 @@ const prefixWithOrg = (value: string) => value.replace(/^(org:)*/, 'org:');
75
75
/**
76
76
* Checks if a user has the required organization-level authorization.
77
77
* Verifies if the user has the specified role or permission within their organization.
78
- * @returns null, if unable to determine due to missing data or unspecified role/permission.
78
+ *
79
+ * @returns Null, if unable to determine due to missing data or unspecified role/permission.
79
80
*/
80
81
const checkOrgAuthorization : CheckOrgAuthorization = ( params , options ) => {
81
82
const { orgId, orgRole, orgPermissions } = options ;
@@ -162,7 +163,8 @@ const validateReverificationConfig = (config: ReverificationConfig | undefined |
162
163
* Evaluates if the user meets re-verification authentication requirements.
163
164
* Compares the user's factor verification ages against the specified maxAge.
164
165
* Handles different verification levels (first factor, second factor, multi-factor).
165
- * @returns null, if requirements or verification data are missing.
166
+ *
167
+ * @returns Null, if requirements or verification data are missing.
166
168
*/
167
169
const checkReverificationAuthorization : CheckReverificationAuthorization = ( params , { factorVerificationAge } ) => {
168
170
if ( ! params . reverification || ! factorVerificationAge ) {
@@ -237,6 +239,7 @@ type AuthStateOptions = {
237
239
/**
238
240
* Shared utility function that centralizes auth state resolution logic,
239
241
* preventing duplication across different packages.
242
+ *
240
243
* @internal
241
244
*/
242
245
const resolveAuthState = ( {
@@ -306,7 +309,7 @@ const resolveAuthState = ({
306
309
} as const ;
307
310
}
308
311
309
- if ( ! ! sessionId && ! ! sessionClaims && ! ! userId && ! ! orgId && ! ! orgRole ) {
312
+ if ( ! ! sessionId && ! ! userId && ! ! orgId && ! ! orgRole ) {
310
313
return {
311
314
isLoaded : true ,
312
315
isSignedIn : true ,
@@ -323,7 +326,7 @@ const resolveAuthState = ({
323
326
} as const ;
324
327
}
325
328
326
- if ( ! ! sessionId && ! ! sessionClaims && ! ! userId && ! orgId ) {
329
+ if ( ! ! sessionId && ! ! userId && ! orgId ) {
327
330
return {
328
331
isLoaded : true ,
329
332
isSignedIn : true ,
@@ -341,4 +344,4 @@ const resolveAuthState = ({
341
344
}
342
345
} ;
343
346
344
- export { createCheckAuthorization , validateReverificationConfig , resolveAuthState , splitByScope } ;
347
+ export { createCheckAuthorization , resolveAuthState , splitByScope , validateReverificationConfig } ;
0 commit comments