File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -84,16 +84,17 @@ export function clientRegistrationHandler({
8484 : undefined ; 
8585 const  clientIdIssuedAt  =  Math . floor ( Date . now ( )  /  1000 ) ; 
8686
87+  // Calculate client secret expiry time 
88+  const  clientsDoExpire  =  clientSecretExpirySeconds  >  0 
89+  const  secretExpiryTime  =  clientsDoExpire  ? clientIdIssuedAt  +  clientSecretExpirySeconds  : 0 
90+  const  clientSecretExpiresAt  =  isPublicClient  ? undefined  : secretExpiryTime 
91+ 
8792 let  clientInfo : OAuthClientInformationFull  =  { 
8893 ...clientMetadata , 
8994 client_id : clientId , 
9095 client_secret : clientSecret , 
9196 client_id_issued_at : clientIdIssuedAt , 
92-  client_secret_expires_at : isPublicClient  
93-  ? clientSecretExpirySeconds  >  0  
94-  ? clientIdIssuedAt  +  clientSecretExpirySeconds  
95-  : 0 
96-  : undefined , 
97+  client_secret_expires_at : clientSecretExpiresAt , 
9798 } ; 
9899
99100 clientInfo  =  await  clientsStore . registerClient ! ( clientInfo ) ; 
                         You can’t perform that action at this time. 
           
                  
0 commit comments