@genesislcap/foundation-auth 15.46.2-FUI-2628.3 → 15.46.2-FUI-2625.2
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/dts/credential/types.d.ts +3 -1
- package/dist/dts/credential/types.d.ts.map +1 -1
- package/dist/dts/dto/EVENT_LOGIN_AUTH.d.ts +3 -1
- package/dist/dts/dto/EVENT_LOGIN_AUTH.d.ts.map +1 -1
- package/dist/dts/dto/EVENT_LOGIN_AUTH_NACK.d.ts +9 -0
- package/dist/dts/dto/EVENT_LOGIN_AUTH_NACK.d.ts.map +1 -1
- package/dist/dts/dto/index.d.ts +1 -0
- package/dist/dts/dto/index.d.ts.map +1 -1
- package/dist/dts/entity/loginNack.d.ts +6 -0
- package/dist/dts/entity/loginNack.d.ts.map +1 -1
- package/dist/dts/machine/machine.d.ts.map +1 -1
- package/dist/dts/machine/types.d.ts +5 -0
- package/dist/dts/machine/types.d.ts.map +1 -1
- package/dist/dts/mapper/loginMapper.d.ts.map +1 -1
- package/dist/dts/routes/verify/verify.d.ts +11 -0
- package/dist/dts/routes/verify/verify.d.ts.map +1 -1
- package/dist/dts/routes/verify/verify.styles.d.ts +6 -0
- package/dist/dts/routes/verify/verify.styles.d.ts.map +1 -0
- package/dist/dts/routes/verify/verify.template.d.ts.map +1 -1
- package/dist/esm/credential/credentialManager.js +1 -1
- package/dist/esm/machine/machine.js +72 -5
- package/dist/esm/machine/types.js +1 -0
- package/dist/esm/mapper/loginMapper.js +2 -4
- package/dist/esm/routes/verify/verify.js +61 -3
- package/dist/esm/routes/verify/verify.styles.js +35 -0
- package/dist/esm/routes/verify/verify.template.js +20 -1
- package/dist/esm/translation.json +3 -0
- package/dist/foundation-auth.api.json +167 -3
- package/dist/foundation-auth.d.ts +25 -2
- package/package.json +17 -17
|
@@ -77,11 +77,13 @@ export type JWTCredentials = {
|
|
|
77
77
|
/**
|
|
78
78
|
* @remarks
|
|
79
79
|
* Will be sourced from MFA_CODE in url params.
|
|
80
|
+
* Set `mfaResend` to request a new code without submitting one (AUTH-473 / FUI-2625).
|
|
80
81
|
* @public
|
|
81
82
|
*/
|
|
82
83
|
export type MFACredentials = {
|
|
83
84
|
type: CredentialType & CredentialType.MFA;
|
|
84
|
-
mfaToken
|
|
85
|
+
mfaToken?: string;
|
|
86
|
+
mfaResend?: boolean;
|
|
85
87
|
};
|
|
86
88
|
/**
|
|
87
89
|
* Union of all credential types.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/credential/types.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,6BAA6B,CAAC;CACvC;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,+EAAgD,CAAC;AAErF;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,sBAAsB,GAAG;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,GAAG,EAAE,CAAC;AAEjE;;;GAGG;AACH,oBAAY,cAAc;IACxB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,GAAG,QAAQ;CACZ;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IA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AAG,cAAc,CAAC,KAAK,CAAC;IAC5C,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,cAAc,GAAG,cAAc,CAAC,GAAG,CAAC;IAC1C,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,cAAc,GAAG,cAAc,CAAC,GAAG,CAAC;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,cAAc,GAAG,cAAc,CAAC,GAAG,CAAC;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,WAAW,GACnB,gBAAgB,GAChB,cAAc,GACd,cAAc,GACd,kBAAkB,GAClB,cAAc,CAAC"}
|
|
@@ -15,7 +15,9 @@ export interface EVENT_LOGIN_AUTH extends MESSAGE {
|
|
|
15
15
|
readonly JWT: string;
|
|
16
16
|
readonly DOMAIN: string;
|
|
17
17
|
} | {
|
|
18
|
-
readonly MFA_CODE
|
|
18
|
+
readonly MFA_CODE?: string;
|
|
19
|
+
/** When true, requests a new MFA code (AUTH-473). */
|
|
20
|
+
readonly MFA_RESEND?: boolean;
|
|
19
21
|
};
|
|
20
22
|
}
|
|
21
23
|
//# sourceMappingURL=EVENT_LOGIN_AUTH.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EVENT_LOGIN_AUTH.d.ts","sourceRoot":"","sources":["../../../src/dto/EVENT_LOGIN_AUTH.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,OAAO;IAC/C,QAAQ,CAAC,OAAO,EACZ;QACE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;KAC3B,GACD;QACE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;KACrC,GACD;QACE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;KAC5B,GACD;QACE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;KACzB,GACD;QACE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"EVENT_LOGIN_AUTH.d.ts","sourceRoot":"","sources":["../../../src/dto/EVENT_LOGIN_AUTH.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,OAAO;IAC/C,QAAQ,CAAC,OAAO,EACZ;QACE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;KAC3B,GACD;QACE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;KACrC,GACD;QACE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;KAC5B,GACD;QACE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;KACzB,GACD;QACE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAC3B,qDAAqD;QACrD,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;KAC/B,CAAC;CACP"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { NACK } from './NACK';
|
|
2
|
+
/**
|
|
3
|
+
* MFA delivery mechanism returned on MFA_REQUIRED / MFA_FAILED NACKs (AUTH-473).
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export type MFA_TYPE = 'NOTIFY' | 'QR_CODE';
|
|
2
7
|
/**
|
|
3
8
|
* @public
|
|
4
9
|
*/
|
|
@@ -8,5 +13,9 @@ export interface EVENT_LOGIN_AUTH_NACK extends NACK {
|
|
|
8
13
|
*/
|
|
9
14
|
readonly REFRESH_AUTH_TOKEN: string;
|
|
10
15
|
readonly REFRESH_TOKEN_EXPIRATION_MINS: number;
|
|
16
|
+
/**
|
|
17
|
+
* MFA type when MFA is required or has failed (AUTH-473).
|
|
18
|
+
*/
|
|
19
|
+
readonly MFA_TYPE?: MFA_TYPE;
|
|
11
20
|
}
|
|
12
21
|
//# sourceMappingURL=EVENT_LOGIN_AUTH_NACK.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EVENT_LOGIN_AUTH_NACK.d.ts","sourceRoot":"","sources":["../../../src/dto/EVENT_LOGIN_AUTH_NACK.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,IAAI;IACjD;;OAEG;IACH,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,6BAA6B,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"EVENT_LOGIN_AUTH_NACK.d.ts","sourceRoot":"","sources":["../../../src/dto/EVENT_LOGIN_AUTH_NACK.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,IAAI;IACjD;;OAEG;IACH,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,6BAA6B,EAAE,MAAM,CAAC;IAC/C;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CAC9B"}
|
package/dist/dts/dto/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { EVENT_CHANGE_USER_PASSWORD } from './EVENT_CHANGE_USER_PASSWORD';
|
|
|
3
3
|
export { EVENT_LOGIN_AUTH } from './EVENT_LOGIN_AUTH';
|
|
4
4
|
export { EVENT_LOGIN_AUTH_ACK } from './EVENT_LOGIN_AUTH_ACK';
|
|
5
5
|
export { EVENT_LOGIN_AUTH_NACK } from './EVENT_LOGIN_AUTH_NACK';
|
|
6
|
+
export type { MFA_TYPE } from './EVENT_LOGIN_AUTH_NACK';
|
|
6
7
|
export { EVENT_LOGIN_DETAILS_ACK } from './EVENT_LOGIN_DETAILS_ACK';
|
|
7
8
|
export { EVENT_LOGOUT_NACK } from './EVENT_LOGOUT_NACK';
|
|
8
9
|
export { EVENT_PASSWORD_RESET_ACTION } from './EVENT_PASSWORD_RESET_ACTION';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dto/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,oBAAoB,E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EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { MFA_TYPE } from '../dto/EVENT_LOGIN_AUTH_NACK';
|
|
1
2
|
import type { Nack } from './nack';
|
|
2
3
|
/**
|
|
3
4
|
* @public
|
|
@@ -8,7 +9,12 @@ export interface LoginNack extends Nack {
|
|
|
8
9
|
readonly hasIncorrectCredentials: boolean;
|
|
9
10
|
readonly maxTriesReached: boolean;
|
|
10
11
|
readonly isMFARequired: boolean;
|
|
12
|
+
readonly isMFAFailed: boolean;
|
|
11
13
|
readonly hasPasswordExpired: boolean;
|
|
12
14
|
readonly requiresTermsAndConditions: boolean;
|
|
15
|
+
/** MFA challenge session / credentials no longer usable (e.g. expired refresh). */
|
|
16
|
+
readonly hasNoCompatibleProviders: boolean;
|
|
17
|
+
/** MFA delivery type from AUTH-473 (`NOTIFY` | `QR_CODE`). */
|
|
18
|
+
readonly mfaType?: MFA_TYPE;
|
|
13
19
|
}
|
|
14
20
|
//# sourceMappingURL=loginNack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loginNack.d.ts","sourceRoot":"","sources":["../../../src/entity/loginNack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,IAAI;IACrC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,0BAA0B,EAAE,MAAM,CAAC;IAC5C,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC;IAC1C,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"loginNack.d.ts","sourceRoot":"","sources":["../../../src/entity/loginNack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,IAAI;IACrC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,0BAA0B,EAAE,MAAM,CAAC;IAC5C,QAAQ,CAAC,uBAAuB,EAAE,OAAO,CAAC;IAC1C,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC;IAC7C,mFAAmF;IACnF,QAAQ,CAAC,wBAAwB,EAAE,OAAO,CAAC;IAC3C,8DAA8D;IAC9D,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;CAC7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../src/machine/machine.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,YAAY,EACZ,iBAAiB,EAMjB,OAAO,EACR,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EACL,IAAI,EASL,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,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;;;;;;;;GA6BG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAE5C"}
|
|
@@ -2,6 +2,7 @@ import type { MachineContext } from '@genesislcap/foundation-state-machine';
|
|
|
2
2
|
import type { User } from '@genesislcap/foundation-user';
|
|
3
3
|
import type { DoneInvokeEvent, ErrorEvent } from 'xstate';
|
|
4
4
|
import { Credentials } from '../credential';
|
|
5
|
+
import type { MFA_TYPE } from '../dto/EVENT_LOGIN_AUTH_NACK';
|
|
5
6
|
import type { AuthDTO, AuthEntity } from '../mapper';
|
|
6
7
|
/**
|
|
7
8
|
* @public
|
|
@@ -85,6 +86,10 @@ export interface AuthMachineContext extends MachineContext {
|
|
|
85
86
|
* The user, either authenticated or anonymous.
|
|
86
87
|
*/
|
|
87
88
|
user: User;
|
|
89
|
+
/**
|
|
90
|
+
* MFA delivery type from the latest MFA_REQUIRED / MFA_FAILED NACK (AUTH-473).
|
|
91
|
+
*/
|
|
92
|
+
mfaType?: MFA_TYPE;
|
|
88
93
|
}
|
|
89
94
|
/**
|
|
90
95
|
* AuthMachineEvent type.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/machine/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAkB,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,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C,MAAM,EAAE,WAAW,GAAG,MAAM,IAAI,eAAe,CAEtF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,IAAI,SAAS,CAE1E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,WAAY,SAAQ,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC;CAAG;AAErE;;;GAGG;AACH,qBAAa,kBAAmB,YAAW,WAAW;IAC9C,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC;IAE3B;;OAEG;IACH,QAAQ,GAAI,KAAK,QAAQ,KAAG,WAAW,CAwDrC;IAEF;;OAEG;IACH,KAAK,GAAI,QAAQ,WAAW,KAAG,QAAQ,CAiDrC;IAEF,SAAS,CAAC,aAAa,GAAI,QAAQ,SAAS,KAAG,YAAY,CACnB;IAExC,SAAS,CAAC,cAAc,GAAI,UAAU,UAAU,EAAE,KAAG,aAAa,EAAE,CAM3D;CACV;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,mEAA0E,CAAC"}
|
|
@@ -11,15 +11,26 @@ import { BaseRoute } from '../base';
|
|
|
11
11
|
export declare class Verify extends BaseRoute {
|
|
12
12
|
credentialManager: CredentialManager;
|
|
13
13
|
code: string;
|
|
14
|
+
/** Seconds remaining before Resend is enabled. */
|
|
15
|
+
resendCountdown: number;
|
|
16
|
+
private resendTimer;
|
|
14
17
|
connectedCallback(): void;
|
|
18
|
+
disconnectedCallback(): void;
|
|
15
19
|
/**
|
|
16
20
|
* True while AuthMachine is in the awaitingMfa state (or its feedback return path still tagged).
|
|
17
21
|
*/
|
|
18
22
|
get isAwaitingMfa(): boolean;
|
|
23
|
+
/** Show Resend only for notify-delivered MFA codes (AUTH-473 / FUI-2625). */
|
|
24
|
+
get showResendCode(): boolean;
|
|
25
|
+
get isMfaSessionExpired(): boolean;
|
|
19
26
|
get submitDisabled(): boolean;
|
|
27
|
+
get resendDisabled(): boolean;
|
|
20
28
|
onBack: () => void;
|
|
29
|
+
onResend: () => void;
|
|
21
30
|
onSubmit(event: Event): void;
|
|
22
31
|
private attemptMfaLogin;
|
|
23
32
|
login(params: LoginParams): void;
|
|
33
|
+
private startResendCooldown;
|
|
34
|
+
private clearResendTimer;
|
|
24
35
|
}
|
|
25
36
|
//# sourceMappingURL=verify.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../../src/routes/verify/verify.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAkC,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../../src/routes/verify/verify.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAkC,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAMpC;;;;;;GAMG;AACH,qBAKa,MAAO,SAAQ,SAAS;IAChB,iBAAiB,EAAE,iBAAiB,CAAC;IAC5C,IAAI,EAAE,MAAM,CAAM;IAC9B,kDAAkD;IACtC,eAAe,SAA2B;IAEtD,OAAO,CAAC,WAAW,CAA6C;IAEhE,iBAAiB;IAcjB,oBAAoB;IAKpB;;OAEG;IACH,IAAI,aAAa,YAIhB;IAED,6EAA6E;IAC7E,IAAI,cAAc,YAEjB;IAED,IAAI,mBAAmB,YAEtB;IAED,IAAI,cAAc,YAEjB;IAED,IAAI,cAAc,YAIjB;IAED,MAAM,aAIJ;IAEF,QAAQ,aAkBN;IAEF,QAAQ,CAAC,KAAK,EAAE,KAAK;IAerB,OAAO,CAAC,eAAe;IAevB,KAAK,CAAC,MAAM,EAAE,WAAW;IAIzB,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,gBAAgB;CAMzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify.styles.d.ts","sourceRoot":"","sources":["../../../../src/routes/verify/verify.styles.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,YAAY,iDA4BxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/verify/verify.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;;GAGG;AACH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"verify.template.d.ts","sourceRoot":"","sources":["../../../../src/routes/verify/verify.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC;;;GAGG;AACH,eAAO,MAAM,cAAc,6DAiE1B,CAAC"}
|
|
@@ -99,7 +99,7 @@ let DefaultCredentialManager = class DefaultCredentialManager {
|
|
|
99
99
|
return credentials && !!credentials.ssoToken;
|
|
100
100
|
}
|
|
101
101
|
validateMFACredentials(credentials) {
|
|
102
|
-
return credentials && !!credentials.mfaToken;
|
|
102
|
+
return credentials && (!!credentials.mfaToken || !!credentials.mfaResend);
|
|
103
103
|
}
|
|
104
104
|
validateUserCredentialData(data, ensurePassword) {
|
|
105
105
|
const baseResult = data &&
|
|
@@ -179,7 +179,7 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
179
179
|
meta: {
|
|
180
180
|
content: 'Logged in.',
|
|
181
181
|
},
|
|
182
|
-
entry: ['storeBasicCredentials', 'loggedInCallback', 'postLoginRedirect'],
|
|
182
|
+
entry: ['storeBasicCredentials', 'clearMfaType', 'loggedInCallback', 'postLoginRedirect'],
|
|
183
183
|
on: {
|
|
184
184
|
logout: {
|
|
185
185
|
target: '#authMachine.loggingOut',
|
|
@@ -443,13 +443,22 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
443
443
|
actions: ['setUser'],
|
|
444
444
|
target: '#authMachine.authCheck',
|
|
445
445
|
},
|
|
446
|
+
{
|
|
447
|
+
guard: and(['isLoginNackEntity', 'hasNoCompatibleProviders', 'isMfaChallenge']),
|
|
448
|
+
target: '#authMachine.feedback.mfaSessionExpired',
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
guard: and(['isLoginNackEntity', 'hasIncorrectCredentials', 'isMfaChallenge']),
|
|
452
|
+
actions: 'storeMfaType',
|
|
453
|
+
target: '#authMachine.feedback.incorrectMfa',
|
|
454
|
+
},
|
|
446
455
|
{
|
|
447
456
|
guard: and(['isLoginNackEntity', 'hasIncorrectCredentials']),
|
|
448
457
|
target: '#authMachine.feedback.incorrectCredentials',
|
|
449
458
|
},
|
|
450
459
|
{
|
|
451
460
|
guard: and(['isLoginNackEntity', 'isMFARequired']),
|
|
452
|
-
actions: 'storeBasicCredentials',
|
|
461
|
+
actions: ['storeBasicCredentials', 'storeMfaType'],
|
|
453
462
|
target: '#authMachine.feedback.mfaRequired',
|
|
454
463
|
},
|
|
455
464
|
{
|
|
@@ -463,8 +472,14 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
463
472
|
target: '#authMachine.feedback.termsAndConditions',
|
|
464
473
|
},
|
|
465
474
|
{
|
|
466
|
-
guard: and(['isLoginNackEntity', '
|
|
467
|
-
|
|
475
|
+
guard: and(['isLoginNackEntity', 'isMFAFailed']),
|
|
476
|
+
actions: 'storeMfaType',
|
|
477
|
+
target: '#authMachine.feedback.incorrectMfa',
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
guard: and(['isLoginNackEntity', 'isMfaChallenge']),
|
|
481
|
+
actions: 'storeMfaType',
|
|
482
|
+
target: '#authMachine.feedback.incorrectMfa',
|
|
468
483
|
},
|
|
469
484
|
{
|
|
470
485
|
guard: 'isLoginNackEntity',
|
|
@@ -556,7 +571,7 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
556
571
|
after: {
|
|
557
572
|
feedbackDelay: [
|
|
558
573
|
{
|
|
559
|
-
guard: '
|
|
574
|
+
guard: 'isMfaChallenge',
|
|
560
575
|
target: '#authMachine.awaitingMfa',
|
|
561
576
|
},
|
|
562
577
|
{
|
|
@@ -565,6 +580,38 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
565
580
|
],
|
|
566
581
|
},
|
|
567
582
|
},
|
|
583
|
+
/**
|
|
584
|
+
* Wrong MFA code (or failed MFA resend). Keeps awaitingMfa so Verify does not bounce to login.
|
|
585
|
+
*/
|
|
586
|
+
incorrectMfa: {
|
|
587
|
+
tags: ['feedback', 'incorrectCredentials', 'awaitingMfa'],
|
|
588
|
+
meta: {
|
|
589
|
+
content: 'MESSAGE_INCORRECT_MFA_CODE',
|
|
590
|
+
},
|
|
591
|
+
entry: ['verifyRedirect'],
|
|
592
|
+
after: {
|
|
593
|
+
feedbackDelay: {
|
|
594
|
+
target: '#authMachine.awaitingMfa',
|
|
595
|
+
},
|
|
596
|
+
},
|
|
597
|
+
},
|
|
598
|
+
/**
|
|
599
|
+
* MFA challenge credentials expired (e.g. NO_COMPATIBLE_PROVIDERS on resend).
|
|
600
|
+
* Keep user on verify with a warning, then return to login.
|
|
601
|
+
*/
|
|
602
|
+
mfaSessionExpired: {
|
|
603
|
+
tags: ['feedback', 'awaitingMfa', 'mfaSessionExpired'],
|
|
604
|
+
meta: {
|
|
605
|
+
content: 'MESSAGE_MFA_SESSION_EXPIRED',
|
|
606
|
+
},
|
|
607
|
+
entry: ['verifyRedirect'],
|
|
608
|
+
after: {
|
|
609
|
+
mfaSessionExpiredRedirectDelay: {
|
|
610
|
+
actions: ['resetContext', 'loginRedirect'],
|
|
611
|
+
target: '#authMachine.idle',
|
|
612
|
+
},
|
|
613
|
+
},
|
|
614
|
+
},
|
|
568
615
|
mfaRequired: {
|
|
569
616
|
tags: ['feedback', 'mfaRequired'],
|
|
570
617
|
meta: {
|
|
@@ -696,6 +743,17 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
696
743
|
this.cm.storeCredentials(data);
|
|
697
744
|
}
|
|
698
745
|
},
|
|
746
|
+
storeMfaType: assign(({ event, context }) => {
|
|
747
|
+
if (isDoneInvokeEvent(event) &&
|
|
748
|
+
isLoginNackEntity(event.output) &&
|
|
749
|
+
event.output.mfaType) {
|
|
750
|
+
return { mfaType: event.output.mfaType };
|
|
751
|
+
}
|
|
752
|
+
return { mfaType: context.mfaType };
|
|
753
|
+
}),
|
|
754
|
+
clearMfaType: assign({
|
|
755
|
+
mfaType: () => undefined,
|
|
756
|
+
}),
|
|
699
757
|
postLoginRedirect: this.config.postLoginRedirect,
|
|
700
758
|
postLogoutRedirect: this.config.postLogoutRedirect,
|
|
701
759
|
resetPasswordRedirect: () => this.routing.navigateTo('reset-password?expired'),
|
|
@@ -732,7 +790,15 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
732
790
|
isMFARequired: ({ event }) => isDoneInvokeEvent(event)
|
|
733
791
|
? isLoginNackEntity(event.output) && event.output.isMFARequired
|
|
734
792
|
: false,
|
|
793
|
+
isMFAFailed: ({ event }) => isDoneInvokeEvent(event)
|
|
794
|
+
? isLoginNackEntity(event.output) && event.output.isMFAFailed
|
|
795
|
+
: false,
|
|
796
|
+
hasNoCompatibleProviders: ({ event }) => isDoneInvokeEvent(event)
|
|
797
|
+
? isLoginNackEntity(event.output) && event.output.hasNoCompatibleProviders
|
|
798
|
+
: false,
|
|
735
799
|
isMfaLoginParams: ({ context }) => isLoginParams(context.params) && context.params.type === CredentialType.MFA,
|
|
800
|
+
isMfaChallenge: ({ context }) => (isLoginParams(context.params) && context.params.type === CredentialType.MFA) ||
|
|
801
|
+
!!context.mfaType,
|
|
736
802
|
hasPasswordExpired: ({ event }) => isDoneInvokeEvent(event)
|
|
737
803
|
? isLoginNackEntity(event.output) && event.output.hasPasswordExpired
|
|
738
804
|
: false,
|
|
@@ -754,6 +820,7 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
754
820
|
delays: {
|
|
755
821
|
feedbackDelay: this.config.feedbackDelay,
|
|
756
822
|
logoutFeedbackDelay: 1000,
|
|
823
|
+
mfaSessionExpiredRedirectDelay: 5000,
|
|
757
824
|
},
|
|
758
825
|
});
|
|
759
826
|
this.start();
|
|
@@ -82,7 +82,7 @@ export class DefaultLoginMapper {
|
|
|
82
82
|
return ack;
|
|
83
83
|
}
|
|
84
84
|
if (isLoginNackDTO(dto)) {
|
|
85
|
-
const nack = Object.assign(Object.assign({}, fromDTONack(dto)), { refreshAuthToken: dto.REFRESH_AUTH_TOKEN, refreshTokenExpirationMins: dto.REFRESH_TOKEN_EXPIRATION_MINS, hasIncorrectCredentials: hasDTOErrorWarningCode(dto, 'INCORRECT_CREDENTIALS'), maxTriesReached: hasDTOErrorWarningCode(dto, 'MAX_TRIES_REACHED'), isMFARequired: hasDTOErrorWarningCode(dto, 'MFA_REQUIRED'), hasPasswordExpired: hasDTOErrorWarningCode(dto, 'PASSWORD_EXPIRED'), requiresTermsAndConditions: hasDTOErrorWarningCode(dto, 'TERMS_ACCEPTANCE_REQUIRED') });
|
|
85
|
+
const nack = Object.assign(Object.assign({}, fromDTONack(dto)), { refreshAuthToken: dto.REFRESH_AUTH_TOKEN, refreshTokenExpirationMins: dto.REFRESH_TOKEN_EXPIRATION_MINS, hasIncorrectCredentials: hasDTOErrorWarningCode(dto, 'INCORRECT_CREDENTIALS'), maxTriesReached: hasDTOErrorWarningCode(dto, 'MAX_TRIES_REACHED'), isMFARequired: hasDTOErrorWarningCode(dto, 'MFA_REQUIRED'), isMFAFailed: hasDTOErrorWarningCode(dto, 'MFA_FAILED'), hasPasswordExpired: hasDTOErrorWarningCode(dto, 'PASSWORD_EXPIRED'), requiresTermsAndConditions: hasDTOErrorWarningCode(dto, 'TERMS_ACCEPTANCE_REQUIRED'), hasNoCompatibleProviders: hasDTOErrorWarningCode(dto, 'NO_COMPATIBLE_PROVIDERS'), mfaType: dto.MFA_TYPE });
|
|
86
86
|
return nack;
|
|
87
87
|
}
|
|
88
88
|
if (isNackDTO(dto)) {
|
|
@@ -129,9 +129,7 @@ export class DefaultLoginMapper {
|
|
|
129
129
|
};
|
|
130
130
|
break;
|
|
131
131
|
case CredentialType.MFA:
|
|
132
|
-
DETAILS = {
|
|
133
|
-
MFA_CODE: params.mfaToken,
|
|
134
|
-
};
|
|
132
|
+
DETAILS = Object.assign(Object.assign({}, (params.mfaToken ? { MFA_CODE: params.mfaToken } : {})), (params.mfaResend ? { MFA_RESEND: true } : {}));
|
|
135
133
|
break;
|
|
136
134
|
}
|
|
137
135
|
const dto = {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { customElement, observable } from '@microsoft/fast-element';
|
|
3
3
|
import { CredentialManager, CredentialType } from '../../credential';
|
|
4
|
-
import { commonStyles } from '../../styles';
|
|
5
4
|
import { logger } from '../../utils';
|
|
6
5
|
import { BaseRoute } from '../base';
|
|
6
|
+
import { VerifyStyles as styles } from './verify.styles';
|
|
7
7
|
import { VerifyTemplate as template } from './verify.template';
|
|
8
|
+
const RESEND_COOLDOWN_SECONDS = 60;
|
|
8
9
|
/**
|
|
9
10
|
* Verify
|
|
10
11
|
*
|
|
@@ -16,10 +17,29 @@ let Verify = class Verify extends BaseRoute {
|
|
|
16
17
|
constructor() {
|
|
17
18
|
super(...arguments);
|
|
18
19
|
this.code = '';
|
|
20
|
+
/** Seconds remaining before Resend is enabled. */
|
|
21
|
+
this.resendCountdown = RESEND_COOLDOWN_SECONDS;
|
|
19
22
|
this.onBack = () => {
|
|
23
|
+
this.clearResendTimer();
|
|
20
24
|
this.store.authMachine.send({ type: 'cancel-mfa' });
|
|
21
25
|
this.routing.navigateTo('');
|
|
22
26
|
};
|
|
27
|
+
this.onResend = () => {
|
|
28
|
+
if (this.resendDisabled) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const mfaCredentials = {
|
|
32
|
+
type: CredentialType.MFA,
|
|
33
|
+
mfaResend: true,
|
|
34
|
+
};
|
|
35
|
+
if (!this.credentialManager.validateMFACredentials(mfaCredentials)) {
|
|
36
|
+
logger.debug(`MFA resend credentials appear invalid, aborting.`);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
logger.debug(`Requesting a new MFA code.`);
|
|
40
|
+
this.startResendCooldown();
|
|
41
|
+
this.login(mfaCredentials);
|
|
42
|
+
};
|
|
23
43
|
}
|
|
24
44
|
connectedCallback() {
|
|
25
45
|
super.connectedCallback();
|
|
@@ -28,6 +48,13 @@ let Verify = class Verify extends BaseRoute {
|
|
|
28
48
|
this.routing.navigateTo('');
|
|
29
49
|
return;
|
|
30
50
|
}
|
|
51
|
+
if (this.showResendCode) {
|
|
52
|
+
this.startResendCooldown();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
disconnectedCallback() {
|
|
56
|
+
this.clearResendTimer();
|
|
57
|
+
super.disconnectedCallback();
|
|
31
58
|
}
|
|
32
59
|
/**
|
|
33
60
|
* True while AuthMachine is in the awaitingMfa state (or its feedback return path still tagged).
|
|
@@ -35,8 +62,18 @@ let Verify = class Verify extends BaseRoute {
|
|
|
35
62
|
get isAwaitingMfa() {
|
|
36
63
|
return (this.store.authMachine.matches('awaitingMfa') || this.store.authMachine.hasTag('awaitingMfa'));
|
|
37
64
|
}
|
|
65
|
+
/** Show Resend only for notify-delivered MFA codes (AUTH-473 / FUI-2625). */
|
|
66
|
+
get showResendCode() {
|
|
67
|
+
return this.store.authMachine.context.mfaType === 'NOTIFY';
|
|
68
|
+
}
|
|
69
|
+
get isMfaSessionExpired() {
|
|
70
|
+
return this.store.authMachine.hasTag('mfaSessionExpired');
|
|
71
|
+
}
|
|
38
72
|
get submitDisabled() {
|
|
39
|
-
return this.store.authMachine.hasTag('pending');
|
|
73
|
+
return this.store.authMachine.hasTag('pending') || this.isMfaSessionExpired;
|
|
74
|
+
}
|
|
75
|
+
get resendDisabled() {
|
|
76
|
+
return (this.submitDisabled || this.resendCountdown > 0 || this.isMfaSessionExpired || !this.showResendCode);
|
|
40
77
|
}
|
|
41
78
|
onSubmit(event) {
|
|
42
79
|
event.preventDefault();
|
|
@@ -64,6 +101,24 @@ let Verify = class Verify extends BaseRoute {
|
|
|
64
101
|
login(params) {
|
|
65
102
|
this.$emit('auth-login', params);
|
|
66
103
|
}
|
|
104
|
+
startResendCooldown() {
|
|
105
|
+
this.clearResendTimer();
|
|
106
|
+
this.resendCountdown = RESEND_COOLDOWN_SECONDS;
|
|
107
|
+
this.resendTimer = setInterval(() => {
|
|
108
|
+
if (this.resendCountdown <= 1) {
|
|
109
|
+
this.resendCountdown = 0;
|
|
110
|
+
this.clearResendTimer();
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
this.resendCountdown -= 1;
|
|
114
|
+
}, 1000);
|
|
115
|
+
}
|
|
116
|
+
clearResendTimer() {
|
|
117
|
+
if (this.resendTimer !== undefined) {
|
|
118
|
+
clearInterval(this.resendTimer);
|
|
119
|
+
this.resendTimer = undefined;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
67
122
|
};
|
|
68
123
|
__decorate([
|
|
69
124
|
CredentialManager
|
|
@@ -71,11 +126,14 @@ __decorate([
|
|
|
71
126
|
__decorate([
|
|
72
127
|
observable
|
|
73
128
|
], Verify.prototype, "code", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
observable
|
|
131
|
+
], Verify.prototype, "resendCountdown", void 0);
|
|
74
132
|
Verify = __decorate([
|
|
75
133
|
customElement({
|
|
76
134
|
name: 'foundation-auth-verify',
|
|
77
135
|
template,
|
|
78
|
-
styles
|
|
136
|
+
styles,
|
|
79
137
|
})
|
|
80
138
|
], Verify);
|
|
81
139
|
export { Verify };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { css } from '@microsoft/fast-element';
|
|
2
|
+
import { commonStyles } from '../../styles';
|
|
3
|
+
/**
|
|
4
|
+
* VerifyStyles
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export const VerifyStyles = css `
|
|
8
|
+
${commonStyles}
|
|
9
|
+
|
|
10
|
+
.links {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: calc(var(--design-unit) * 2px);
|
|
14
|
+
margin: calc(var(--design-unit) * 2px) 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.link-url {
|
|
18
|
+
width: fit-content;
|
|
19
|
+
height: fit-content;
|
|
20
|
+
font-weight: 500;
|
|
21
|
+
font-size: calc(var(--type-ramp-base-font-size) / 4 * var(--design-unit));
|
|
22
|
+
opacity: 80%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.link-url:hover:not([disabled]) {
|
|
26
|
+
opacity: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.resend-countdown {
|
|
30
|
+
color: var(--accent-foreground-rest);
|
|
31
|
+
font-size: calc(var(--type-ramp-base-font-size) / 4 * var(--design-unit));
|
|
32
|
+
opacity: 80%;
|
|
33
|
+
white-space: nowrap;
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { sync } from '@genesislcap/foundation-utils';
|
|
2
|
-
import { html } from '@microsoft/fast-element';
|
|
2
|
+
import { html, when } from '@microsoft/fast-element';
|
|
3
3
|
import { backButton, showEnvironmentIndicator, submitButton } from '../base';
|
|
4
4
|
/**
|
|
5
5
|
* VerifyTemplate
|
|
@@ -30,6 +30,25 @@ export const VerifyTemplate = html `
|
|
|
30
30
|
>
|
|
31
31
|
<span class="form-title">${(x) => x.toLocalisedText('VERIFY_FORM_TITLE')}</span>
|
|
32
32
|
</rapid-verification-code-input>
|
|
33
|
+
${when((x) => x.showResendCode, html `
|
|
34
|
+
<div class="links">
|
|
35
|
+
<rapid-button
|
|
36
|
+
class="link-url"
|
|
37
|
+
appearance="link"
|
|
38
|
+
type="button"
|
|
39
|
+
?disabled=${(x) => x.resendDisabled}
|
|
40
|
+
@click=${(x) => x.onResend()}
|
|
41
|
+
data-test-id="resend-code"
|
|
42
|
+
>
|
|
43
|
+
${(x) => x.toLocalisedText('VERIFY_RESEND_CODE')}
|
|
44
|
+
</rapid-button>
|
|
45
|
+
${when((x) => x.resendCountdown > 0 && !x.isMfaSessionExpired, html `
|
|
46
|
+
<span class="resend-countdown" data-test-id="resend-countdown"
|
|
47
|
+
>${(x) => `${x.resendCountdown}s`}</span
|
|
48
|
+
>
|
|
49
|
+
`)}
|
|
50
|
+
</div>
|
|
51
|
+
`)}
|
|
33
52
|
<div class="form-buttons">
|
|
34
53
|
${(x) => submitButton(x.toLocalisedText('VERIFY_SUBMIT_BUTTON_LABEL'), 'submit', x.submitDisabled)}
|
|
35
54
|
${(x) => backButton(() => x.onBack(), x.toLocalisedText('VERIFY_BACK_BUTTON'))}
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
"VERIFY_FORM_TITLE": "Verification Code",
|
|
36
36
|
"VERIFY_SUBMIT_BUTTON_LABEL": "Verify and Login",
|
|
37
37
|
"VERIFY_BACK_BUTTON": "Back",
|
|
38
|
+
"VERIFY_RESEND_CODE": "Resend code",
|
|
39
|
+
"MESSAGE_MFA_SESSION_EXPIRED": "Your verification session has expired. Please log in again.",
|
|
38
40
|
"FIELD_USERNAME_TITLE": "Username",
|
|
39
41
|
"FIELD_EMAIL_TITLE": "Email",
|
|
40
42
|
"FIELD_PASSWORD_TITLE": "Password",
|
|
@@ -45,6 +47,7 @@
|
|
|
45
47
|
"MESSAGE_FORGOT_PASSWORD_RESET": "Please check your inbox for reset instructions.",
|
|
46
48
|
"MESSAGE_PASSWORD_RESET_SUCCESS": "Password reset success. Redirecting to login.",
|
|
47
49
|
"MESSAGE_INCORRECT_CREDENTIALS": "Incorrect credentials, please try again.",
|
|
50
|
+
"MESSAGE_INCORRECT_MFA_CODE": "Incorrect verification code, please try again.",
|
|
48
51
|
"MESSAGE_MFA_REQUIRED": "Please check your inbox for your login link.",
|
|
49
52
|
"MESSAGE_PASSWORD_EXPIRED": "You are required to change your password.",
|
|
50
53
|
"ERROR_UNKNOWN_ERROR": "Unknown error.",
|
|
@@ -2095,6 +2095,34 @@
|
|
|
2095
2095
|
"endIndex": 2
|
|
2096
2096
|
}
|
|
2097
2097
|
},
|
|
2098
|
+
{
|
|
2099
|
+
"kind": "PropertySignature",
|
|
2100
|
+
"canonicalReference": "@genesislcap/foundation-auth!AuthMachineContext#mfaType:member",
|
|
2101
|
+
"docComment": "/**\n * MFA delivery type from the latest MFA_REQUIRED / MFA_FAILED NACK (AUTH-473).\n */\n",
|
|
2102
|
+
"excerptTokens": [
|
|
2103
|
+
{
|
|
2104
|
+
"kind": "Content",
|
|
2105
|
+
"text": "mfaType?: "
|
|
2106
|
+
},
|
|
2107
|
+
{
|
|
2108
|
+
"kind": "Reference",
|
|
2109
|
+
"text": "MFA_TYPE",
|
|
2110
|
+
"canonicalReference": "@genesislcap/foundation-auth!MFA_TYPE:type"
|
|
2111
|
+
},
|
|
2112
|
+
{
|
|
2113
|
+
"kind": "Content",
|
|
2114
|
+
"text": ";"
|
|
2115
|
+
}
|
|
2116
|
+
],
|
|
2117
|
+
"isReadonly": false,
|
|
2118
|
+
"isOptional": true,
|
|
2119
|
+
"releaseTag": "Public",
|
|
2120
|
+
"name": "mfaType",
|
|
2121
|
+
"propertyTypeTokenRange": {
|
|
2122
|
+
"startIndex": 1,
|
|
2123
|
+
"endIndex": 2
|
|
2124
|
+
}
|
|
2125
|
+
},
|
|
2098
2126
|
{
|
|
2099
2127
|
"kind": "PropertySignature",
|
|
2100
2128
|
"canonicalReference": "@genesislcap/foundation-auth!AuthMachineContext#params:member",
|
|
@@ -9181,6 +9209,34 @@
|
|
|
9181
9209
|
"name": "EVENT_LOGIN_AUTH_NACK",
|
|
9182
9210
|
"preserveMemberOrder": false,
|
|
9183
9211
|
"members": [
|
|
9212
|
+
{
|
|
9213
|
+
"kind": "PropertySignature",
|
|
9214
|
+
"canonicalReference": "@genesislcap/foundation-auth!EVENT_LOGIN_AUTH_NACK#MFA_TYPE:member",
|
|
9215
|
+
"docComment": "/**\n * MFA type when MFA is required or has failed (AUTH-473).\n */\n",
|
|
9216
|
+
"excerptTokens": [
|
|
9217
|
+
{
|
|
9218
|
+
"kind": "Content",
|
|
9219
|
+
"text": "readonly MFA_TYPE?: "
|
|
9220
|
+
},
|
|
9221
|
+
{
|
|
9222
|
+
"kind": "Reference",
|
|
9223
|
+
"text": "MFA_TYPE",
|
|
9224
|
+
"canonicalReference": "@genesislcap/foundation-auth!MFA_TYPE:type"
|
|
9225
|
+
},
|
|
9226
|
+
{
|
|
9227
|
+
"kind": "Content",
|
|
9228
|
+
"text": ";"
|
|
9229
|
+
}
|
|
9230
|
+
],
|
|
9231
|
+
"isReadonly": true,
|
|
9232
|
+
"isOptional": true,
|
|
9233
|
+
"releaseTag": "Public",
|
|
9234
|
+
"name": "MFA_TYPE",
|
|
9235
|
+
"propertyTypeTokenRange": {
|
|
9236
|
+
"startIndex": 1,
|
|
9237
|
+
"endIndex": 2
|
|
9238
|
+
}
|
|
9239
|
+
},
|
|
9184
9240
|
{
|
|
9185
9241
|
"kind": "PropertySignature",
|
|
9186
9242
|
"canonicalReference": "@genesislcap/foundation-auth!EVENT_LOGIN_AUTH_NACK#REFRESH_AUTH_TOKEN:member",
|
|
@@ -9278,7 +9334,7 @@
|
|
|
9278
9334
|
},
|
|
9279
9335
|
{
|
|
9280
9336
|
"kind": "Content",
|
|
9281
|
-
"text": "{\n readonly USER_NAME: string;\n readonly PASSWORD: string;\n } | {\n readonly USER_NAME: string;\n readonly REFRESH_AUTH_TOKEN: string;\n } | {\n readonly SSO_TOKEN: string;\n } | {\n readonly JWT: string;\n readonly DOMAIN: string;\n } | {\n readonly MFA_CODE
|
|
9337
|
+
"text": "{\n readonly USER_NAME: string;\n readonly PASSWORD: string;\n } | {\n readonly USER_NAME: string;\n readonly REFRESH_AUTH_TOKEN: string;\n } | {\n readonly SSO_TOKEN: string;\n } | {\n readonly JWT: string;\n readonly DOMAIN: string;\n } | {\n readonly MFA_CODE?: string;\n readonly MFA_RESEND?: boolean;\n }"
|
|
9282
9338
|
},
|
|
9283
9339
|
{
|
|
9284
9340
|
"kind": "Content",
|
|
@@ -11836,6 +11892,33 @@
|
|
|
11836
11892
|
"endIndex": 2
|
|
11837
11893
|
}
|
|
11838
11894
|
},
|
|
11895
|
+
{
|
|
11896
|
+
"kind": "PropertySignature",
|
|
11897
|
+
"canonicalReference": "@genesislcap/foundation-auth!LoginNack#hasNoCompatibleProviders:member",
|
|
11898
|
+
"docComment": "/**\n * MFA challenge session / credentials no longer usable (e.g. expired refresh).\n */\n",
|
|
11899
|
+
"excerptTokens": [
|
|
11900
|
+
{
|
|
11901
|
+
"kind": "Content",
|
|
11902
|
+
"text": "readonly hasNoCompatibleProviders: "
|
|
11903
|
+
},
|
|
11904
|
+
{
|
|
11905
|
+
"kind": "Content",
|
|
11906
|
+
"text": "boolean"
|
|
11907
|
+
},
|
|
11908
|
+
{
|
|
11909
|
+
"kind": "Content",
|
|
11910
|
+
"text": ";"
|
|
11911
|
+
}
|
|
11912
|
+
],
|
|
11913
|
+
"isReadonly": true,
|
|
11914
|
+
"isOptional": false,
|
|
11915
|
+
"releaseTag": "Public",
|
|
11916
|
+
"name": "hasNoCompatibleProviders",
|
|
11917
|
+
"propertyTypeTokenRange": {
|
|
11918
|
+
"startIndex": 1,
|
|
11919
|
+
"endIndex": 2
|
|
11920
|
+
}
|
|
11921
|
+
},
|
|
11839
11922
|
{
|
|
11840
11923
|
"kind": "PropertySignature",
|
|
11841
11924
|
"canonicalReference": "@genesislcap/foundation-auth!LoginNack#hasPasswordExpired:member",
|
|
@@ -11863,6 +11946,33 @@
|
|
|
11863
11946
|
"endIndex": 2
|
|
11864
11947
|
}
|
|
11865
11948
|
},
|
|
11949
|
+
{
|
|
11950
|
+
"kind": "PropertySignature",
|
|
11951
|
+
"canonicalReference": "@genesislcap/foundation-auth!LoginNack#isMFAFailed:member",
|
|
11952
|
+
"docComment": "",
|
|
11953
|
+
"excerptTokens": [
|
|
11954
|
+
{
|
|
11955
|
+
"kind": "Content",
|
|
11956
|
+
"text": "readonly isMFAFailed: "
|
|
11957
|
+
},
|
|
11958
|
+
{
|
|
11959
|
+
"kind": "Content",
|
|
11960
|
+
"text": "boolean"
|
|
11961
|
+
},
|
|
11962
|
+
{
|
|
11963
|
+
"kind": "Content",
|
|
11964
|
+
"text": ";"
|
|
11965
|
+
}
|
|
11966
|
+
],
|
|
11967
|
+
"isReadonly": true,
|
|
11968
|
+
"isOptional": false,
|
|
11969
|
+
"releaseTag": "Public",
|
|
11970
|
+
"name": "isMFAFailed",
|
|
11971
|
+
"propertyTypeTokenRange": {
|
|
11972
|
+
"startIndex": 1,
|
|
11973
|
+
"endIndex": 2
|
|
11974
|
+
}
|
|
11975
|
+
},
|
|
11866
11976
|
{
|
|
11867
11977
|
"kind": "PropertySignature",
|
|
11868
11978
|
"canonicalReference": "@genesislcap/foundation-auth!LoginNack#isMFARequired:member",
|
|
@@ -11917,6 +12027,34 @@
|
|
|
11917
12027
|
"endIndex": 2
|
|
11918
12028
|
}
|
|
11919
12029
|
},
|
|
12030
|
+
{
|
|
12031
|
+
"kind": "PropertySignature",
|
|
12032
|
+
"canonicalReference": "@genesislcap/foundation-auth!LoginNack#mfaType:member",
|
|
12033
|
+
"docComment": "/**\n * MFA delivery type from AUTH-473 (`NOTIFY` | `QR_CODE`).\n */\n",
|
|
12034
|
+
"excerptTokens": [
|
|
12035
|
+
{
|
|
12036
|
+
"kind": "Content",
|
|
12037
|
+
"text": "readonly mfaType?: "
|
|
12038
|
+
},
|
|
12039
|
+
{
|
|
12040
|
+
"kind": "Reference",
|
|
12041
|
+
"text": "MFA_TYPE",
|
|
12042
|
+
"canonicalReference": "@genesislcap/foundation-auth!MFA_TYPE:type"
|
|
12043
|
+
},
|
|
12044
|
+
{
|
|
12045
|
+
"kind": "Content",
|
|
12046
|
+
"text": ";"
|
|
12047
|
+
}
|
|
12048
|
+
],
|
|
12049
|
+
"isReadonly": true,
|
|
12050
|
+
"isOptional": true,
|
|
12051
|
+
"releaseTag": "Public",
|
|
12052
|
+
"name": "mfaType",
|
|
12053
|
+
"propertyTypeTokenRange": {
|
|
12054
|
+
"startIndex": 1,
|
|
12055
|
+
"endIndex": 2
|
|
12056
|
+
}
|
|
12057
|
+
},
|
|
11920
12058
|
{
|
|
11921
12059
|
"kind": "PropertySignature",
|
|
11922
12060
|
"canonicalReference": "@genesislcap/foundation-auth!LoginNack#refreshAuthToken:member",
|
|
@@ -12726,10 +12864,36 @@
|
|
|
12726
12864
|
"endIndex": 5
|
|
12727
12865
|
}
|
|
12728
12866
|
},
|
|
12867
|
+
{
|
|
12868
|
+
"kind": "TypeAlias",
|
|
12869
|
+
"canonicalReference": "@genesislcap/foundation-auth!MFA_TYPE:type",
|
|
12870
|
+
"docComment": "/**\n * MFA delivery mechanism returned on MFA_REQUIRED / MFA_FAILED NACKs (AUTH-473).\n *\n * @public\n */\n",
|
|
12871
|
+
"excerptTokens": [
|
|
12872
|
+
{
|
|
12873
|
+
"kind": "Content",
|
|
12874
|
+
"text": "export type MFA_TYPE = "
|
|
12875
|
+
},
|
|
12876
|
+
{
|
|
12877
|
+
"kind": "Content",
|
|
12878
|
+
"text": "'NOTIFY' | 'QR_CODE'"
|
|
12879
|
+
},
|
|
12880
|
+
{
|
|
12881
|
+
"kind": "Content",
|
|
12882
|
+
"text": ";"
|
|
12883
|
+
}
|
|
12884
|
+
],
|
|
12885
|
+
"fileUrlPath": "src/dto/EVENT_LOGIN_AUTH_NACK.ts",
|
|
12886
|
+
"releaseTag": "Public",
|
|
12887
|
+
"name": "MFA_TYPE",
|
|
12888
|
+
"typeTokenRange": {
|
|
12889
|
+
"startIndex": 1,
|
|
12890
|
+
"endIndex": 2
|
|
12891
|
+
}
|
|
12892
|
+
},
|
|
12729
12893
|
{
|
|
12730
12894
|
"kind": "TypeAlias",
|
|
12731
12895
|
"canonicalReference": "@genesislcap/foundation-auth!MFACredentials:type",
|
|
12732
|
-
"docComment": "/**\n * @remarks\n *\n * Will be sourced from MFA_CODE in url params.\n *\n * @public\n */\n",
|
|
12896
|
+
"docComment": "/**\n * @remarks\n *\n * Will be sourced from MFA_CODE in url params. Set `mfaResend` to request a new code without submitting one (AUTH-473 / FUI-2625).\n *\n * @public\n */\n",
|
|
12733
12897
|
"excerptTokens": [
|
|
12734
12898
|
{
|
|
12735
12899
|
"kind": "Content",
|
|
@@ -12755,7 +12919,7 @@
|
|
|
12755
12919
|
},
|
|
12756
12920
|
{
|
|
12757
12921
|
"kind": "Content",
|
|
12758
|
-
"text": ";\n mfaToken
|
|
12922
|
+
"text": ";\n mfaToken?: string;\n mfaResend?: boolean;\n}"
|
|
12759
12923
|
},
|
|
12760
12924
|
{
|
|
12761
12925
|
"kind": "Content",
|
|
@@ -423,6 +423,10 @@ export declare interface AuthMachineContext extends MachineContext {
|
|
|
423
423
|
* The user, either authenticated or anonymous.
|
|
424
424
|
*/
|
|
425
425
|
user: User;
|
|
426
|
+
/**
|
|
427
|
+
* MFA delivery type from the latest MFA_REQUIRED / MFA_FAILED NACK (AUTH-473).
|
|
428
|
+
*/
|
|
429
|
+
mfaType?: MFA_TYPE;
|
|
426
430
|
}
|
|
427
431
|
|
|
428
432
|
/**
|
|
@@ -1264,7 +1268,9 @@ export declare interface EVENT_LOGIN_AUTH extends MESSAGE {
|
|
|
1264
1268
|
readonly JWT: string;
|
|
1265
1269
|
readonly DOMAIN: string;
|
|
1266
1270
|
} | {
|
|
1267
|
-
readonly MFA_CODE
|
|
1271
|
+
readonly MFA_CODE?: string;
|
|
1272
|
+
/** When true, requests a new MFA code (AUTH-473). */
|
|
1273
|
+
readonly MFA_RESEND?: boolean;
|
|
1268
1274
|
};
|
|
1269
1275
|
}
|
|
1270
1276
|
|
|
@@ -1314,6 +1320,10 @@ export declare interface EVENT_LOGIN_AUTH_NACK extends NACK {
|
|
|
1314
1320
|
*/
|
|
1315
1321
|
readonly REFRESH_AUTH_TOKEN: string;
|
|
1316
1322
|
readonly REFRESH_TOKEN_EXPIRATION_MINS: number;
|
|
1323
|
+
/**
|
|
1324
|
+
* MFA type when MFA is required or has failed (AUTH-473).
|
|
1325
|
+
*/
|
|
1326
|
+
readonly MFA_TYPE?: MFA_TYPE;
|
|
1317
1327
|
}
|
|
1318
1328
|
|
|
1319
1329
|
/**
|
|
@@ -2268,8 +2278,13 @@ export declare interface LoginNack extends Nack {
|
|
|
2268
2278
|
readonly hasIncorrectCredentials: boolean;
|
|
2269
2279
|
readonly maxTriesReached: boolean;
|
|
2270
2280
|
readonly isMFARequired: boolean;
|
|
2281
|
+
readonly isMFAFailed: boolean;
|
|
2271
2282
|
readonly hasPasswordExpired: boolean;
|
|
2272
2283
|
readonly requiresTermsAndConditions: boolean;
|
|
2284
|
+
/** MFA challenge session / credentials no longer usable (e.g. expired refresh). */
|
|
2285
|
+
readonly hasNoCompatibleProviders: boolean;
|
|
2286
|
+
/** MFA delivery type from AUTH-473 (`NOTIFY` | `QR_CODE`). */
|
|
2287
|
+
readonly mfaType?: MFA_TYPE;
|
|
2273
2288
|
}
|
|
2274
2289
|
|
|
2275
2290
|
/**
|
|
@@ -2428,14 +2443,22 @@ export declare interface MessageMapper<TLookup extends MessageMapperLookup, K ex
|
|
|
2428
2443
|
*/
|
|
2429
2444
|
export declare type MessageMapperLookup = Record<string, Mapper<unknown, unknown>>;
|
|
2430
2445
|
|
|
2446
|
+
/**
|
|
2447
|
+
* MFA delivery mechanism returned on MFA_REQUIRED / MFA_FAILED NACKs (AUTH-473).
|
|
2448
|
+
* @public
|
|
2449
|
+
*/
|
|
2450
|
+
export declare type MFA_TYPE = 'NOTIFY' | 'QR_CODE';
|
|
2451
|
+
|
|
2431
2452
|
/**
|
|
2432
2453
|
* @remarks
|
|
2433
2454
|
* Will be sourced from MFA_CODE in url params.
|
|
2455
|
+
* Set `mfaResend` to request a new code without submitting one (AUTH-473 / FUI-2625).
|
|
2434
2456
|
* @public
|
|
2435
2457
|
*/
|
|
2436
2458
|
export declare type MFACredentials = {
|
|
2437
2459
|
type: CredentialType_2 & CredentialType_2.MFA;
|
|
2438
|
-
mfaToken
|
|
2460
|
+
mfaToken?: string;
|
|
2461
|
+
mfaResend?: boolean;
|
|
2439
2462
|
};
|
|
2440
2463
|
|
|
2441
2464
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-auth",
|
|
3
3
|
"description": "Genesis Foundation Auth",
|
|
4
|
-
"version": "15.46.2-FUI-
|
|
4
|
+
"version": "15.46.2-FUI-2625.2",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/foundation-auth.d.ts",
|
|
@@ -134,24 +134,24 @@
|
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
|
-
"@genesislcap/foundation-testing": "15.46.2-FUI-
|
|
138
|
-
"@genesislcap/genx": "15.46.2-FUI-
|
|
139
|
-
"@genesislcap/ts-builder": "15.46.2-FUI-
|
|
140
|
-
"@genesislcap/uvu-playwright-builder": "15.46.2-FUI-
|
|
141
|
-
"@genesislcap/vite-builder": "15.46.2-FUI-
|
|
142
|
-
"@genesislcap/webpack-builder": "15.46.2-FUI-
|
|
137
|
+
"@genesislcap/foundation-testing": "15.46.2-FUI-2625.2",
|
|
138
|
+
"@genesislcap/genx": "15.46.2-FUI-2625.2",
|
|
139
|
+
"@genesislcap/ts-builder": "15.46.2-FUI-2625.2",
|
|
140
|
+
"@genesislcap/uvu-playwright-builder": "15.46.2-FUI-2625.2",
|
|
141
|
+
"@genesislcap/vite-builder": "15.46.2-FUI-2625.2",
|
|
142
|
+
"@genesislcap/webpack-builder": "15.46.2-FUI-2625.2"
|
|
143
143
|
},
|
|
144
144
|
"dependencies": {
|
|
145
|
-
"@genesislcap/foundation-comms": "15.46.2-FUI-
|
|
146
|
-
"@genesislcap/foundation-events": "15.46.2-FUI-
|
|
147
|
-
"@genesislcap/foundation-i18n": "15.46.2-FUI-
|
|
148
|
-
"@genesislcap/foundation-logger": "15.46.2-FUI-
|
|
149
|
-
"@genesislcap/foundation-state-machine": "15.46.2-FUI-
|
|
150
|
-
"@genesislcap/foundation-store": "15.46.2-FUI-
|
|
151
|
-
"@genesislcap/foundation-ui": "15.46.2-FUI-
|
|
152
|
-
"@genesislcap/foundation-user": "15.46.2-FUI-
|
|
153
|
-
"@genesislcap/foundation-utils": "15.46.2-FUI-
|
|
154
|
-
"@genesislcap/foundation-zero": "15.46.2-FUI-
|
|
145
|
+
"@genesislcap/foundation-comms": "15.46.2-FUI-2625.2",
|
|
146
|
+
"@genesislcap/foundation-events": "15.46.2-FUI-2625.2",
|
|
147
|
+
"@genesislcap/foundation-i18n": "15.46.2-FUI-2625.2",
|
|
148
|
+
"@genesislcap/foundation-logger": "15.46.2-FUI-2625.2",
|
|
149
|
+
"@genesislcap/foundation-state-machine": "15.46.2-FUI-2625.2",
|
|
150
|
+
"@genesislcap/foundation-store": "15.46.2-FUI-2625.2",
|
|
151
|
+
"@genesislcap/foundation-ui": "15.46.2-FUI-2625.2",
|
|
152
|
+
"@genesislcap/foundation-user": "15.46.2-FUI-2625.2",
|
|
153
|
+
"@genesislcap/foundation-utils": "15.46.2-FUI-2625.2",
|
|
154
|
+
"@genesislcap/foundation-zero": "15.46.2-FUI-2625.2",
|
|
155
155
|
"@microsoft/fast-components": "2.30.6",
|
|
156
156
|
"@microsoft/fast-element": "1.14.0",
|
|
157
157
|
"@microsoft/fast-foundation": "2.50.0",
|