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({
84
84
: undefined ;
85
85
const clientIdIssuedAt = Math . floor ( Date . now ( ) / 1000 ) ;
86
86
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
+
87
92
let clientInfo : OAuthClientInformationFull = {
88
93
...clientMetadata ,
89
94
client_id : clientId ,
90
95
client_secret : clientSecret ,
91
96
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 ,
97
98
} ;
98
99
99
100
clientInfo = await clientsStore . registerClient ! ( clientInfo ) ;
You can’t perform that action at this time.
0 commit comments