@@ -34,6 +34,13 @@ export type SignedInAuthObject = {
34
34
orgRole : OrganizationCustomRoleKey | undefined ;
35
35
orgSlug : string | undefined ;
36
36
orgPermissions : OrganizationCustomPermissionKey [ ] | undefined ;
37
+ /**
38
+ * Factor Verification Age
39
+ * Each item represents the minutes that have passed since the last time a first or second factor were verified.
40
+ * [fistFactorAge, secondFactorAge]
41
+ * @experimental This API is experimental and may change at any moment.
42
+ */
43
+ __experimental_factorVerificationAge : [ number | null , number | null ] ;
37
44
getToken : ServerGetToken ;
38
45
has : CheckAuthorizationWithCustomPermissions ;
39
46
debug : AuthObjectDebug ;
@@ -51,6 +58,13 @@ export type SignedOutAuthObject = {
51
58
orgRole : null ;
52
59
orgSlug : null ;
53
60
orgPermissions : null ;
61
+ /**
62
+ * Factor Verification Age
63
+ * Each item represents the minutes that have passed since the last time a first or second factor were verified.
64
+ * [fistFactorAge, secondFactorAge]
65
+ * @experimental This API is experimental and may change at any moment.
66
+ */
67
+ __experimental_factorVerificationAge : [ null , null ] ;
54
68
getToken : ServerGetToken ;
55
69
has : CheckAuthorizationWithCustomPermissions ;
56
70
debug : AuthObjectDebug ;
@@ -86,6 +100,7 @@ export function signedInAuthObject(
86
100
org_slug : orgSlug ,
87
101
org_permissions : orgPermissions ,
88
102
sub : userId ,
103
+ fva : __experimental_factorVerificationAge ,
89
104
} = sessionClaims ;
90
105
const apiClient = createBackendApiClient ( authenticateContext ) ;
91
106
const getToken = createGetToken ( {
@@ -103,6 +118,7 @@ export function signedInAuthObject(
103
118
orgRole,
104
119
orgSlug,
105
120
orgPermissions,
121
+ __experimental_factorVerificationAge,
106
122
getToken,
107
123
has : createHasAuthorization ( { orgId, orgRole, orgPermissions, userId } ) ,
108
124
debug : createDebug ( { ...authenticateContext , sessionToken } ) ,
@@ -122,6 +138,7 @@ export function signedOutAuthObject(debugData?: AuthObjectDebugData): SignedOutA
122
138
orgRole : null ,
123
139
orgSlug : null ,
124
140
orgPermissions : null ,
141
+ __experimental_factorVerificationAge : [ null , null ] ,
125
142
getToken : ( ) => Promise . resolve ( null ) ,
126
143
has : ( ) => false ,
127
144
debug : createDebug ( debugData ) ,
0 commit comments