Skip to content

Commit 958bf64

Browse files
authored
fix(openid4vc): update verified state for more states (#1831)
Signed-off-by: Timo Glastra <timo@animo.id>
1 parent 6b4b71b commit 958bf64

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/openid4vc/src/openid4vc-verifier/repository/OpenId4VcRelyingPartyEventEmitter.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,10 @@ export class OpenId4VcRelyingPartyEventHandler {
142142
await this.withSession(context.contextCorrelationId, async (agentContext, verificationSessionRepository) => {
143143
const verificationSession = await verificationSessionRepository.getById(agentContext, event.correlationId)
144144

145-
if (verificationSession.state === OpenId4VcVerificationSessionState.RequestUriRetrieved) {
145+
if (
146+
verificationSession.state !== OpenId4VcVerificationSessionState.Error &&
147+
verificationSession.state !== OpenId4VcVerificationSessionState.ResponseVerified
148+
) {
146149
const previousState = verificationSession.state
147150
verificationSession.authorizationResponsePayload = event.subject.payload
148151
verificationSession.state = OpenId4VcVerificationSessionState.ResponseVerified

0 commit comments

Comments
 (0)