File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -519,7 +519,7 @@ export class VcIssuer<DIDDoc extends object> {
519519 }
520520 if ( ! iat ) {
521521 throw new Error ( IAT_ERROR )
522- } else if ( iat > createdAt + tokenExpiresIn ) {
522+ } else if ( iat > createdAt + tokenExpiresIn * 1000 ) {
523523 throw new Error ( IAT_ERROR )
524524 }
525525 // todo: Add a check of iat against current TS on server with a skew
Original file line number Diff line number Diff line change @@ -115,9 +115,9 @@ export function createCredentialOfferURI(
115115 return createCredentialOfferURIFromObject ( credentialOffer , opts )
116116}
117117
118- export const isPreAuthorizedCodeExpired = ( state : CredentialOfferSession , expirationDuration : number ) => {
118+ export const isPreAuthorizedCodeExpired = ( state : CredentialOfferSession , expirationDurationInSeconds : number ) => {
119119 const now = + new Date ( )
120- const expirationTime = state . createdAt + expirationDuration
120+ const expirationTime = state . createdAt + expirationDurationInSeconds * 1000
121121 return now >= expirationTime
122122}
123123
You can’t perform that action at this time.
0 commit comments