@incodetech/web 0.0.0-dev-20260924-e9f5a050 → 0.0.0-dev-20260925-37b0f54d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/flow/flow.es.js +1 -1
- package/dist/id/id.es.js +21 -1
- package/dist/types/workflow.d.ts +21 -0
- package/dist/workflow/workflow.es.js +13 -5
- package/package.json +2 -2
package/dist/flow/flow.es.js
CHANGED
|
@@ -790,7 +790,7 @@ var IncodeFlowContent = ({ config, onFinish, onError, initState, flowState, flow
|
|
|
790
790
|
...idConfig,
|
|
791
791
|
...isSecondId ? { isSecondId: true } : {},
|
|
792
792
|
digitalIdReturn: config.digitalIdReturn,
|
|
793
|
-
digitalIdReturnUrl: config.digitalIdReturnUrl
|
|
793
|
+
digitalIdReturnUrl: config.digitalIdReturnUrl
|
|
794
794
|
},
|
|
795
795
|
onFinish: (output) => flowManager.completeModule(output),
|
|
796
796
|
onError: (error) => {
|
package/dist/id/id.es.js
CHANGED
|
@@ -970,6 +970,25 @@ var DigitalIdRedirect = ({ manager, state }) => {
|
|
|
970
970
|
return /* @__PURE__ */ u(TransitionSpinner, { hideText: true });
|
|
971
971
|
};
|
|
972
972
|
//#endregion
|
|
973
|
+
//#region src/modules/id/digitalIdRedirect/returnUrl.ts
|
|
974
|
+
/**
|
|
975
|
+
* Where the identity provider sends the user back after the bank login when
|
|
976
|
+
* the host names no return route: the current page, without its query string.
|
|
977
|
+
*
|
|
978
|
+
* The query is dropped on purpose. After a return, the address bar still holds
|
|
979
|
+
* the previous attempt's `success` / `sessionId` / `resultsAccessKey`, and
|
|
980
|
+
* reusing them would stamp a stale result onto the next attempt. The session
|
|
981
|
+
* `uuid` the return leg needs is appended by `createVerification`
|
|
982
|
+
* (`ensureReturnUrlUuid`), so nothing required is lost.
|
|
983
|
+
*
|
|
984
|
+
* Applied once by the ID module, so every surface that renders it — flow,
|
|
985
|
+
* workflow and the standalone `<incode-id>` element — sends a return URL.
|
|
986
|
+
*/
|
|
987
|
+
function getDefaultDigitalIdReturnUrl() {
|
|
988
|
+
if (typeof window === "undefined") return;
|
|
989
|
+
return `${window.location.origin}${window.location.pathname}`;
|
|
990
|
+
}
|
|
991
|
+
//#endregion
|
|
973
992
|
//#region src/modules/id/preloadTutorialAssets.ts
|
|
974
993
|
var started = false;
|
|
975
994
|
function preloadIdTutorialAssets() {
|
|
@@ -1492,7 +1511,8 @@ var IdContent = ({ config, manager: externalManager, onFinish, onError }) => {
|
|
|
1492
1511
|
if (!config) throw new Error("ID capture config is required when no manager is provided");
|
|
1493
1512
|
return createIdCaptureManager({ config: {
|
|
1494
1513
|
...config,
|
|
1495
|
-
supportsOptimizingStatus: config.supportsOptimizingStatus ?? true
|
|
1514
|
+
supportsOptimizingStatus: config.supportsOptimizingStatus ?? true,
|
|
1515
|
+
digitalIdReturnUrl: config.digitalIdReturnUrl ?? getDefaultDigitalIdReturnUrl()
|
|
1496
1516
|
} });
|
|
1497
1517
|
}, { manageLifecycle: !externalManager });
|
|
1498
1518
|
useModuleTerminalCallbacks({
|
package/dist/types/workflow.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { CustomModuleCallback } from '@incodetech/core/workflow';
|
|
|
3
3
|
import { FC } from 'preact/compat';
|
|
4
4
|
import { FinishStatus } from '@incodetech/core/flow';
|
|
5
5
|
import { FunctionComponent } from 'preact';
|
|
6
|
+
import { RedirectReturnParams } from '@incodetech/core/id';
|
|
6
7
|
import { SessionExpiredError } from '@incodetech/core/session';
|
|
7
8
|
import { SVGProps } from 'preact/compat';
|
|
8
9
|
import { WasmConfig } from '@incodetech/core/wasm';
|
|
@@ -169,6 +170,10 @@ declare type MapModuleConfigOptions = {
|
|
|
169
170
|
lang?: string;
|
|
170
171
|
mergeSessionRecordings?: boolean;
|
|
171
172
|
ageAssurance?: boolean;
|
|
173
|
+
digitalIdReturn?: {
|
|
174
|
+
returnParams: RedirectReturnParams;
|
|
175
|
+
};
|
|
176
|
+
digitalIdReturnUrl?: string;
|
|
172
177
|
};
|
|
173
178
|
|
|
174
179
|
declare type ModuleErrorHandler = (message: string | undefined, errorCode?: number, moduleErrorCode?: string, details?: SessionExpiredError) => void;
|
|
@@ -274,6 +279,22 @@ declare type WorkflowBaseConfig = {
|
|
|
274
279
|
authHint?: string;
|
|
275
280
|
/** Login-hint prefill forwarded to the DYNAMIC_FORMS module's `prefillValue`. Distinct from `authHint`. */
|
|
276
281
|
loginHintPrefill?: string;
|
|
282
|
+
/**
|
|
283
|
+
* Digital-ID web-redirect return leg (Trinsic iDIN/FTN). On the return from
|
|
284
|
+
* the identity provider the host parses `success` / `sessionId` /
|
|
285
|
+
* `resultsAccessKey` from the URL and passes them here. The workflow hands
|
|
286
|
+
* them to the ID Capture node, which resumes the verification instead of
|
|
287
|
+
* starting the step over. Same contract as the flow's `digitalIdReturn`.
|
|
288
|
+
*/
|
|
289
|
+
digitalIdReturn?: {
|
|
290
|
+
returnParams: RedirectReturnParams;
|
|
291
|
+
};
|
|
292
|
+
/**
|
|
293
|
+
* https route the identity provider sends the user back to after the bank
|
|
294
|
+
* login. Defaults to the current page without its query string. Same
|
|
295
|
+
* contract as the flow's `digitalIdReturnUrl`.
|
|
296
|
+
*/
|
|
297
|
+
digitalIdReturnUrl?: string;
|
|
277
298
|
onModuleLoading?: (moduleKey: string) => void;
|
|
278
299
|
onModuleLoaded?: (moduleKey: string) => void;
|
|
279
300
|
onUrlUuidRefreshed?: (urlUuid: string) => void;
|
|
@@ -157,6 +157,7 @@ function createWorkflowUIManager(options = {}) {
|
|
|
157
157
|
customModuleCallback: options.customModuleCallback,
|
|
158
158
|
interviewId: options.interviewId,
|
|
159
159
|
isDesktop: options.isDesktop ?? isDesktopOrEmulated(),
|
|
160
|
+
isReturnLeg: options.isReturnLeg,
|
|
160
161
|
getFinishStatus: async (workflowId, signal) => {
|
|
161
162
|
return {
|
|
162
163
|
...await getFinishStatus(workflowId, signal),
|
|
@@ -254,7 +255,8 @@ function useWorkflowInitialization(options) {
|
|
|
254
255
|
managerRef.current = createWorkflowUIManager({
|
|
255
256
|
customModuleCallback: options.customModuleCallback,
|
|
256
257
|
interviewId: resolvedInterviewId,
|
|
257
|
-
isDesktop: options.isDesktop
|
|
258
|
+
isDesktop: options.isDesktop,
|
|
259
|
+
isReturnLeg: options.digitalIdReturn !== void 0
|
|
258
260
|
});
|
|
259
261
|
managerRef.current.setEndScreenTexts(endScreenTitle, endScreenText);
|
|
260
262
|
managerRef.current.load();
|
|
@@ -289,7 +291,7 @@ function useWorkflowInitialization(options) {
|
|
|
289
291
|
//#region src/modules/workflow/workflow.tsx
|
|
290
292
|
var LazyHomeScreen = z(() => import("../homeScreen-_P6Kq2ip.js").then((module) => ({ default: module.HomeScreen })));
|
|
291
293
|
function mapModuleConfig(options) {
|
|
292
|
-
const { moduleKey, config, workflowId, authHint, loginHintPrefill, lang, mergeSessionRecordings, ageAssurance } = options;
|
|
294
|
+
const { moduleKey, config, workflowId, authHint, loginHintPrefill, lang, mergeSessionRecordings, ageAssurance, digitalIdReturn, digitalIdReturnUrl } = options;
|
|
293
295
|
switch (moduleKey) {
|
|
294
296
|
case "AUTHENTICATION": return {
|
|
295
297
|
...config,
|
|
@@ -310,7 +312,9 @@ function mapModuleConfig(options) {
|
|
|
310
312
|
...config,
|
|
311
313
|
mergeSessionRecordings: config.mergeSessionRecordings ?? mergeSessionRecordings,
|
|
312
314
|
ageAssurance: config.ageAssurance ?? ageAssurance,
|
|
313
|
-
skipProcessId: true
|
|
315
|
+
skipProcessId: true,
|
|
316
|
+
digitalIdReturn,
|
|
317
|
+
digitalIdReturnUrl
|
|
314
318
|
};
|
|
315
319
|
case "ID": return config;
|
|
316
320
|
case "SELFIE": return {
|
|
@@ -323,7 +327,9 @@ function mapModuleConfig(options) {
|
|
|
323
327
|
};
|
|
324
328
|
case "SECOND_ID": return {
|
|
325
329
|
...config,
|
|
326
|
-
isSecondId: true
|
|
330
|
+
isSecondId: true,
|
|
331
|
+
digitalIdReturn,
|
|
332
|
+
digitalIdReturnUrl
|
|
327
333
|
};
|
|
328
334
|
case "MANDATORY_CONSENT": return {
|
|
329
335
|
...config,
|
|
@@ -434,7 +440,9 @@ var IncodeWorkflowReady = ({ config, workflowManager: initialManager, onFinish,
|
|
|
434
440
|
loginHintPrefill: config.loginHintPrefill,
|
|
435
441
|
lang: config.lang,
|
|
436
442
|
mergeSessionRecordings: workflowState.workflowConfig.mergeSessionRecordings,
|
|
437
|
-
ageAssurance: workflowState.workflowConfig.ageAssurance
|
|
443
|
+
ageAssurance: workflowState.workflowConfig.ageAssurance,
|
|
444
|
+
digitalIdReturn: config.digitalIdReturn,
|
|
445
|
+
digitalIdReturnUrl: config.digitalIdReturnUrl
|
|
438
446
|
});
|
|
439
447
|
let extraProps = {};
|
|
440
448
|
if (workflowState.currentNode.moduleKey === "REDIRECT_TO_MOBILE") extraProps = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/web",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260925-37b0f54d",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
],
|
|
288
288
|
"dependencies": {
|
|
289
289
|
"preact": "^10.27.2",
|
|
290
|
-
"@incodetech/core": "0.0.0-dev-
|
|
290
|
+
"@incodetech/core": "0.0.0-dev-20260925-37b0f54d"
|
|
291
291
|
},
|
|
292
292
|
"devDependencies": {
|
|
293
293
|
"@fontsource/dm-sans": "^5.2.8",
|