From c8168770f2ff80a89e3f23493d0420bd64242540 Mon Sep 17 00:00:00 2001 From: Varsha Kumari Date: Fri, 24 Jul 2026 16:39:35 +0530 Subject: [PATCH 1/6] added toggel to configure if user will see doc scan or upload screen --- Changelog.md | 4 ++++ package.json | 2 +- src/views/playground/WidgetConfig/Index.vue | 25 ++++++++++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 2e90524..c4024e3 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,6 +1,10 @@ # Changelog ## [Unreleased] +### [3.13.0] - 2026-07-24 +### Added +- Added support for configuring the ID document capture mode through widget configuration. When `enableDocumentUpload` is enabled, users can manually upload their ID document; otherwise, they will use the document scanning flow. + ### [3.12.2] - 2026-07-06 ### Fixed - Fixed a bug where a section was removed from the consent screen. diff --git a/package.json b/package.json index 21b3b9f..dfc0ed9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "entity-developer-dashboard", - "version": "3.12.2", + "version": "3.13.0", "private": true, "scripts": { "serve": "vue-cli-service serve --mode production", diff --git a/src/views/playground/WidgetConfig/Index.vue b/src/views/playground/WidgetConfig/Index.vue index 3a2abfa..b5e8cfb 100644 --- a/src/views/playground/WidgetConfig/Index.vue +++ b/src/views/playground/WidgetConfig/Index.vue @@ -195,7 +195,24 @@ ul { --> - +
  • +
    +
    + + Enable Manual Document Upload + + + + Allow users to manually upload their ID document instead of scanning it. + +
    +
    +
  • @@ -443,6 +460,7 @@ export default { this.widgetConfigTemp.selectiveDisclosure.enabled = false; this.widgetConfigTemp.selectiveDisclosure.fields = []; this.widgetConfigTemp.selectiveDisclosure.frame = null; + this.widgetConfigTemp.enableDocumentUpload = false; } } }, @@ -518,6 +536,9 @@ export default { if (Object.keys(this.widgetConfig).length > 0) { this.widgetConfigTemp = JSON.parse(JSON.stringify(this.widgetConfig)) } + if (typeof this.widgetConfigTemp.enableDocumentUpload !== 'boolean') { + this.$set(this.widgetConfigTemp, 'enableDocumentUpload', false) + } if (typeof this.widgetConfigTemp.isWidgetLogin !== 'boolean') { this.$set(this.widgetConfigTemp, 'isWidgetLogin', true) } @@ -639,6 +660,7 @@ export default { enabled: false, documentType: 'passport' }, + enableDocumentUpload: false, userConsent: { enabled: true, reason: "The app is requesting your KYC data to provide you service", @@ -812,6 +834,7 @@ export default { if (!this.widgetConfigTemp.idOcr?.enabled) { this.widgetConfigTemp.idOcr.documentType = null + this.widgetConfigTemp.enableDocumentUpload = false } else { if (!this.widgetConfigTemp.idOcr.documentType) { this.widgetConfigTemp.idOcr.documentType = 'passport' From 5cd87f15135b2398390de69e53de1265cc777592 Mon Sep 17 00:00:00 2001 From: Varsha Kumari Date: Fri, 24 Jul 2026 18:24:34 +0530 Subject: [PATCH 2/6] updated field name --- Changelog.md | 2 +- src/config.js | 5 +++ src/views/playground/WidgetConfig/Index.vue | 38 ++++++++++++++++----- 3 files changed, 36 insertions(+), 9 deletions(-) diff --git a/Changelog.md b/Changelog.md index c4024e3..2beb8c4 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,7 +3,7 @@ ## [Unreleased] ### [3.13.0] - 2026-07-24 ### Added -- Added support for configuring the ID document capture mode through widget configuration. When `enableDocumentUpload` is enabled, users can manually upload their ID document; otherwise, they will use the document scanning flow. +- Added support for configuring the ID document capture mode through widget configuration. ### [3.12.2] - 2026-07-06 ### Fixed diff --git a/src/config.js b/src/config.js index fe0f207..56b0755 100644 --- a/src/config.js +++ b/src/config.js @@ -106,6 +106,11 @@ config['SERVICE_TYPES'] = Object.freeze({ QUEST: 'QUEST', }) +config['DocumentUploadMode'] = Object.freeze({ + MANUAL: 'MANUAL', + SCAN: 'SCAN', +}) + config['GRANT_TYPES_ENUM'] = Object.freeze({ 'SSI_API': 'access_service_ssi', diff --git a/src/views/playground/WidgetConfig/Index.vue b/src/views/playground/WidgetConfig/Index.vue index b5e8cfb..14be07f 100644 --- a/src/views/playground/WidgetConfig/Index.vue +++ b/src/views/playground/WidgetConfig/Index.vue @@ -201,7 +201,9 @@ ul { Enable Manual Document Upload @@ -413,6 +415,7 @@ import { isAccessDeniedError } from '../../../utils/accessDenied'; // import TrustedIssuer from './components/TrustedIssuer.vue'; import MarketplaceList from '../../../components/MarketplaceList.vue'; import HFBeta from '../../../components/element/HFBeta.vue'; +import config from '../../../config'; export default { name: "WidgetConfig", @@ -460,7 +463,6 @@ export default { this.widgetConfigTemp.selectiveDisclosure.enabled = false; this.widgetConfigTemp.selectiveDisclosure.fields = []; this.widgetConfigTemp.selectiveDisclosure.frame = null; - this.widgetConfigTemp.enableDocumentUpload = false; } } }, @@ -536,9 +538,7 @@ export default { if (Object.keys(this.widgetConfig).length > 0) { this.widgetConfigTemp = JSON.parse(JSON.stringify(this.widgetConfig)) } - if (typeof this.widgetConfigTemp.enableDocumentUpload !== 'boolean') { - this.$set(this.widgetConfigTemp, 'enableDocumentUpload', false) - } + this.migratedocumentUploadMode() if (typeof this.widgetConfigTemp.isWidgetLogin !== 'boolean') { this.$set(this.widgetConfigTemp, 'isWidgetLogin', true) } @@ -606,6 +606,7 @@ export default { SupportedZkProofTypes: Object.freeze({ PROOF_OF_AGE: 'zkProofOfAge', }), + DocumentUploadMode: config.DocumentUploadMode, widgetConfigUI: { faceRecog: { label: "Enable Facial Recoginition", @@ -658,9 +659,9 @@ export default { faceRecog: true, idOcr: { enabled: false, - documentType: 'passport' + documentType: 'passport', + documentUploadMode: config.DocumentUploadMode.SCAN, }, - enableDocumentUpload: false, userConsent: { enabled: true, reason: "The app is requesting your KYC data to provide you service", @@ -826,15 +827,36 @@ export default { criteria: this.ageProofCriteria, }] }, + migratedocumentUploadMode() { + const legacyEnableDocumentUpload = this.widgetConfigTemp.enableDocumentUpload + + if (!this.widgetConfigTemp.idOcr) { + this.$set(this.widgetConfigTemp, 'idOcr', {}) + } + + if (!Object.values(config.DocumentUploadMode).includes(this.widgetConfigTemp.idOcr.documentUploadMode)) { + this.$set( + this.widgetConfigTemp.idOcr, + 'documentUploadMode', + legacyEnableDocumentUpload === true + ? config.DocumentUploadMode.MANUAL + : config.DocumentUploadMode.SCAN, + ) + } + + if (Object.prototype.hasOwnProperty.call(this.widgetConfigTemp, 'enableDocumentUpload')) { + this.$delete(this.widgetConfigTemp, 'enableDocumentUpload') + } + }, validateField() { this.widgetConfigTemp.isWidgetLogin = this.widgetConfigTemp.isWidgetLogin !== false + this.migratedocumentUploadMode() if (!this.widgetConfigTemp.issuerDID) { throw new Error('Issuer DID is required') } if (!this.widgetConfigTemp.idOcr?.enabled) { this.widgetConfigTemp.idOcr.documentType = null - this.widgetConfigTemp.enableDocumentUpload = false } else { if (!this.widgetConfigTemp.idOcr.documentType) { this.widgetConfigTemp.idOcr.documentType = 'passport' From fa418777f4ee8e27601aaa0f9f653c200ee7896c Mon Sep 17 00:00:00 2001 From: Pratap2018 Date: Wed, 29 Jul 2026 16:41:55 +0530 Subject: [PATCH 3/6] added radio for manual and live capture --- src/store/mainStore.js | 28 ++++++++--------- src/views/playground/WidgetConfig/Index.vue | 33 ++++++++------------- 2 files changed, 26 insertions(+), 35 deletions(-) diff --git a/src/store/mainStore.js b/src/store/mainStore.js index 18151c7..7df4efc 100644 --- a/src/store/mainStore.js +++ b/src/store/mainStore.js @@ -1251,8 +1251,8 @@ const mainStore = { return reject(new Error('Tenant url is null or empty, service is not selected')) } - let url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/user`; - // let url = 'http://localhost:3001/api/v1/user' + // let url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/user`; + let url = 'http://localhost:3001/api/v1/user' const paramsObject = {} if (payload.env) { @@ -1323,8 +1323,8 @@ const mainStore = { if (!getters.getSelectedService || !getters.getSelectedService.tenantUrl) { return reject(new Error('Tenant url is null or empty, service is not selected')) } - const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; - // const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` + // const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; + const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` const authToken = getters.getSelectedService.access_token if (!authToken) { return reject(new Error('authToken is invalid, service is not selected')) @@ -1357,8 +1357,8 @@ const mainStore = { if (!getters.getSelectedService || !getters.getSelectedService.tenantUrl) { return reject(new Error('Tenant url is null or empty, service is not selected')) } - const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; - //const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` + // const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; + const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` const authToken = getters.getSelectedService.access_token if (!authToken) { return reject(new Error('authToken is invalid, service is not selected')) @@ -1455,8 +1455,8 @@ const mainStore = { if (!getters.getSelectedService || !getters.getSelectedService.tenantUrl) { return reject(new Error('Tenant url is null or empty, service is not selected')) } - const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; - // const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` + // const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; + const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` const authToken = getters.getSelectedService.access_token if (!authToken) { return reject(new Error('authToken is invalid, service is not selected')) @@ -1563,8 +1563,8 @@ const mainStore = { if (!getters.getSelectedService || !getters.getSelectedService.tenantUrl) { return reject(new Error('Tenant url is null or empty, service is not selected')) } - const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/widget-config`; - // const url = `http://localhost:3001/api/v1/e-kyc/verification/widget-config/` + // const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/widget-config`; + const url = `http://localhost:3001/api/v1/e-kyc/verification/widget-config/` const authToken = getters.getSelectedService.access_token if (!authToken) { return reject(new Error('authToken is invalid, service is not selected')) @@ -1603,8 +1603,8 @@ const mainStore = { if (!getters.getSelectedService || !getters.getSelectedService.tenantUrl) { return reject(new Error('Tenant url is null or empty, service is not selected')) } - const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/widget-config`; - // const url = `http://localhost:3001/api/v1/e-kyc/verification/widget-config` + // const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/widget-config`; + const url = `http://localhost:3001/api/v1/e-kyc/verification/widget-config` const authToken = getters.getSelectedService.access_token if (!authToken) { return reject(new Error('authToken is invalid, service is not selected')) @@ -2360,8 +2360,8 @@ const mainStore = { if (!getters.getSelectedService || !getters.getSelectedService.tenantUrl) { return reject(new Error('Tenant url is null or empty, service is not selected')) } - let url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/user/${sessionId}?env=${encodeURIComponent(envVal)}`; - // let url = `http://localhost:3001/api/v1/user/${sessionId}?env=${encodeURIComponent(envVal)}`; + // let url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/user/${sessionId}?env=${encodeURIComponent(envVal)}`; + let url = `http://localhost:3001/api/v1/user/${sessionId}?env=${encodeURIComponent(envVal)}`; if(businessId !== '' && businessId !== null && businessId !== undefined){ url += `&businessId=${encodeURIComponent(businessId)}` } diff --git a/src/views/playground/WidgetConfig/Index.vue b/src/views/playground/WidgetConfig/Index.vue index 14be07f..75bf4ff 100644 --- a/src/views/playground/WidgetConfig/Index.vue +++ b/src/views/playground/WidgetConfig/Index.vue @@ -181,11 +181,22 @@ ul {
  • -
    +
    {{ this.widgetConfigUI.idOcr.label }}
    +
    + + +
  • -
  • -
    -
    - - Enable Manual Document Upload - - - - Allow users to manually upload their ID document instead of scanning it. - -
    -
    -
  • From decdd65969eaf30f64d64ea3fe45da82b95f89a1 Mon Sep 17 00:00:00 2001 From: Pratap2018 Date: Wed, 29 Jul 2026 16:45:58 +0530 Subject: [PATCH 4/6] fix mainStore --- src/store/mainStore.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/store/mainStore.js b/src/store/mainStore.js index 7df4efc..db5ba40 100644 --- a/src/store/mainStore.js +++ b/src/store/mainStore.js @@ -1251,8 +1251,8 @@ const mainStore = { return reject(new Error('Tenant url is null or empty, service is not selected')) } - // let url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/user`; - let url = 'http://localhost:3001/api/v1/user' + let url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/user`; + // let url = 'http://localhost:3001/api/v1/user' const paramsObject = {} if (payload.env) { @@ -1323,8 +1323,8 @@ const mainStore = { if (!getters.getSelectedService || !getters.getSelectedService.tenantUrl) { return reject(new Error('Tenant url is null or empty, service is not selected')) } - // const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; - const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` + const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; + // const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` const authToken = getters.getSelectedService.access_token if (!authToken) { return reject(new Error('authToken is invalid, service is not selected')) @@ -1357,8 +1357,8 @@ const mainStore = { if (!getters.getSelectedService || !getters.getSelectedService.tenantUrl) { return reject(new Error('Tenant url is null or empty, service is not selected')) } - // const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; - const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` + const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; + // const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` const authToken = getters.getSelectedService.access_token if (!authToken) { return reject(new Error('authToken is invalid, service is not selected')) @@ -1563,8 +1563,8 @@ const mainStore = { if (!getters.getSelectedService || !getters.getSelectedService.tenantUrl) { return reject(new Error('Tenant url is null or empty, service is not selected')) } - // const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/widget-config`; - const url = `http://localhost:3001/api/v1/e-kyc/verification/widget-config/` + const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/widget-config`; + // const url = `http://localhost:3001/api/v1/e-kyc/verification/widget-config/` const authToken = getters.getSelectedService.access_token if (!authToken) { return reject(new Error('authToken is invalid, service is not selected')) @@ -1603,8 +1603,8 @@ const mainStore = { if (!getters.getSelectedService || !getters.getSelectedService.tenantUrl) { return reject(new Error('Tenant url is null or empty, service is not selected')) } - // const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/widget-config`; - const url = `http://localhost:3001/api/v1/e-kyc/verification/widget-config` + const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/widget-config`; + // const url = `http://localhost:3001/api/v1/e-kyc/verification/widget-config` const authToken = getters.getSelectedService.access_token if (!authToken) { return reject(new Error('authToken is invalid, service is not selected')) @@ -2360,8 +2360,8 @@ const mainStore = { if (!getters.getSelectedService || !getters.getSelectedService.tenantUrl) { return reject(new Error('Tenant url is null or empty, service is not selected')) } - // let url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/user/${sessionId}?env=${encodeURIComponent(envVal)}`; - let url = `http://localhost:3001/api/v1/user/${sessionId}?env=${encodeURIComponent(envVal)}`; + let url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/user/${sessionId}?env=${encodeURIComponent(envVal)}`; + // let url = `http://localhost:3001/api/v1/user/${sessionId}?env=${encodeURIComponent(envVal)}`; if(businessId !== '' && businessId !== null && businessId !== undefined){ url += `&businessId=${encodeURIComponent(businessId)}` } From 0e6ebe1a83ecb6914af9517726bfef9798b38adc Mon Sep 17 00:00:00 2001 From: Pratap2018 Date: Wed, 29 Jul 2026 16:47:40 +0530 Subject: [PATCH 5/6] update --- src/store/mainStore.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/store/mainStore.js b/src/store/mainStore.js index db5ba40..01b82e6 100644 --- a/src/store/mainStore.js +++ b/src/store/mainStore.js @@ -1324,7 +1324,7 @@ const mainStore = { return reject(new Error('Tenant url is null or empty, service is not selected')) } const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; - // const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` + //const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` const authToken = getters.getSelectedService.access_token if (!authToken) { return reject(new Error('authToken is invalid, service is not selected')) @@ -1455,8 +1455,8 @@ const mainStore = { if (!getters.getSelectedService || !getters.getSelectedService.tenantUrl) { return reject(new Error('Tenant url is null or empty, service is not selected')) } - // const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; - const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` + const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; + //const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` const authToken = getters.getSelectedService.access_token if (!authToken) { return reject(new Error('authToken is invalid, service is not selected')) From c736f615567befce82773cbcbbcbd0c4ff1ba4a7 Mon Sep 17 00:00:00 2001 From: Pratap2018 Date: Wed, 29 Jul 2026 16:48:55 +0530 Subject: [PATCH 6/6] fmt --- src/store/mainStore.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/store/mainStore.js b/src/store/mainStore.js index 01b82e6..18151c7 100644 --- a/src/store/mainStore.js +++ b/src/store/mainStore.js @@ -1324,7 +1324,7 @@ const mainStore = { return reject(new Error('Tenant url is null or empty, service is not selected')) } const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; - //const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` + // const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` const authToken = getters.getSelectedService.access_token if (!authToken) { return reject(new Error('authToken is invalid, service is not selected')) @@ -1358,7 +1358,7 @@ const mainStore = { return reject(new Error('Tenant url is null or empty, service is not selected')) } const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; - // const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` + //const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` const authToken = getters.getSelectedService.access_token if (!authToken) { return reject(new Error('authToken is invalid, service is not selected')) @@ -1456,7 +1456,7 @@ const mainStore = { return reject(new Error('Tenant url is null or empty, service is not selected')) } const url = `${sanitizeUrl(getters.getSelectedService.tenantUrl)}/api/v1/e-kyc/verification/onchainkyc-config`; - //const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` + // const url = `http://localhost:3001/api/v1/e-kyc/verification/onchainkyc-config` const authToken = getters.getSelectedService.access_token if (!authToken) { return reject(new Error('authToken is invalid, service is not selected'))