diff --git a/packages/oid4vci-holder/src/link-handler/index.ts b/packages/oid4vci-holder/src/link-handler/index.ts index 3b471daba..0ff9d70e6 100644 --- a/packages/oid4vci-holder/src/link-handler/index.ts +++ b/packages/oid4vci-holder/src/link-handler/index.ts @@ -10,16 +10,19 @@ export class OID4VCIHolderLinkHandler extends LinkHandlerAdapter { private readonly stateNavigationListener: | ((oid4vciMachine: OID4VCIMachineInterpreter, state: OID4VCIMachineState, navigation?: any) => Promise) | undefined + private noStateMachinePersistence: boolean; constructor( args: Pick & { priority?: number | DefaultLinkPriorities protocols?: Array + noStateMachinePersistence?: boolean context: IAgentContext }, ) { super({ ...args, id: 'OID4VCIHolder' }) this.context = args.context + this.noStateMachinePersistence = args.noStateMachinePersistence === true this.stateNavigationListener = args.stateNavigationListener } @@ -48,6 +51,7 @@ export class OID4VCIHolderLinkHandler extends LinkHandlerAdapter { cleanupAllOtherInstances: true, cleanupOnFinalState: true, singletonCheck: true, + noRegistration: this.noStateMachinePersistence }) if (hasCode) { interpreter.send(OID4VCIMachineEvents.PROVIDE_AUTHORIZATION_CODE_RESPONSE, { data: uri })