@genesislcap/foundation-auth 15.14.2 → 15.15.0-FUI-2603.5
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/machine/actions.d.ts.map +1 -1
- package/dist/dts/machine/machine.d.ts.map +1 -1
- package/dist/dts/mapper/utils.d.ts.map +1 -1
- package/dist/dts/routes/reset-password/reset-password.d.ts.map +1 -1
- package/dist/esm/machine/actions.js +8 -0
- package/dist/esm/machine/machine.js +91 -24
- package/dist/esm/mapper/utils.js +1 -1
- package/dist/esm/routes/base.js +1 -1
- package/dist/esm/routes/reset-password/reset-password.js +18 -2
- package/dist/esm/translation.json +1 -1
- package/package.json +19 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/machine/actions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/machine/actions.ts"],"names":[],"mappings":"AAQA;;;;;GAKG;AACH,eAAO,MAAM,QAAQ;;;;;;;CAkBnB,CAAC"}
|
|
@@ -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,EAQL,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAEL,iBAAiB,EAIlB,MAAM,eAAe,CAAC;AAIvB,OAAO,EACL,iBAAiB,EAQlB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,WAAW,EAAE,MAA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,GAAG,MAAM,IAAI,IAAI,CAE5D;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,EACD,WAAW,GAAE,MAA0C,GACtD,WAAW,CAWb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reset-password.d.ts","sourceRoot":"","sources":["../../../../src/routes/reset-password/reset-password.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC;;;;;;;;;;;;;GAaG;AACH,qBAKa,aAAc,SAAQ,SAAS;IAC9B,kBAAkB,EAAE,OAAO,CAAS;IACpC,kBAAkB,EAAE,MAAM,CAAM;IAE5C,KAAK,CAAC,KAAK,EAAE,eAAe,CAAC,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"reset-password.d.ts","sourceRoot":"","sources":["../../../../src/routes/reset-password/reset-password.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC;;;;;;;;;;;;;GAaG;AACH,qBAKa,aAAc,SAAQ,SAAS;IAC9B,kBAAkB,EAAE,OAAO,CAAS;IACpC,kBAAkB,EAAE,MAAM,CAAM;IAE5C,KAAK,CAAC,KAAK,EAAE,eAAe,CAAC,QAAQ,CAAC;IAsBhC,QAAQ;IAwBd,IACI,WAAW,mEAEd;CACF"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isErrorEvent } from '@genesislcap/foundation-state-machine';
|
|
2
2
|
import { assign } from 'xstate';
|
|
3
|
+
import { fromDTONack, isNackDTO } from '../mapper';
|
|
3
4
|
import { logger } from '../utils';
|
|
4
5
|
import { NackError } from './errors';
|
|
5
6
|
import { is200Nack } from './guards';
|
|
@@ -10,6 +11,7 @@ import { is200Nack } from './guards';
|
|
|
10
11
|
* @public
|
|
11
12
|
*/
|
|
12
13
|
export const setError = assign(({ event }) => {
|
|
14
|
+
var _a;
|
|
13
15
|
if (isErrorEvent(event)) {
|
|
14
16
|
return {
|
|
15
17
|
error: event.data,
|
|
@@ -21,4 +23,10 @@ export const setError = assign(({ event }) => {
|
|
|
21
23
|
error: NackError.fromEntity(event.output),
|
|
22
24
|
};
|
|
23
25
|
}
|
|
26
|
+
const data = (_a = event.output) === null || _a === void 0 ? void 0 : _a.data;
|
|
27
|
+
if (isNackDTO(data)) {
|
|
28
|
+
return {
|
|
29
|
+
error: NackError.fromEntity(fromDTONack(data)),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
24
32
|
});
|
|
@@ -122,7 +122,17 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
122
122
|
invoke: {
|
|
123
123
|
id: 'loginDetailsFetcher',
|
|
124
124
|
src: fetchMachine.machine,
|
|
125
|
-
onDone:
|
|
125
|
+
onDone: [
|
|
126
|
+
{
|
|
127
|
+
guard: 'isUnauthorizedError',
|
|
128
|
+
target: 'loggedOut',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
guard: 'isFetchError',
|
|
132
|
+
target: 'error.silentLogin',
|
|
133
|
+
},
|
|
134
|
+
this.dtoTransition(),
|
|
135
|
+
],
|
|
126
136
|
onError: [
|
|
127
137
|
{
|
|
128
138
|
guard: 'isUnauthorizedError',
|
|
@@ -146,7 +156,13 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
146
156
|
invoke: {
|
|
147
157
|
id: 'loginFetcher',
|
|
148
158
|
src: fetchMachine.machine,
|
|
149
|
-
onDone:
|
|
159
|
+
onDone: [
|
|
160
|
+
{
|
|
161
|
+
guard: 'isFetchError',
|
|
162
|
+
target: 'error.login',
|
|
163
|
+
},
|
|
164
|
+
this.dtoTransition(),
|
|
165
|
+
],
|
|
150
166
|
onError: 'error.login',
|
|
151
167
|
},
|
|
152
168
|
entry: [
|
|
@@ -205,7 +221,13 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
205
221
|
invoke: {
|
|
206
222
|
id: 'logoutFetcher',
|
|
207
223
|
src: fetchMachine.machine,
|
|
208
|
-
onDone:
|
|
224
|
+
onDone: [
|
|
225
|
+
{
|
|
226
|
+
guard: 'isFetchError',
|
|
227
|
+
target: 'error.logout',
|
|
228
|
+
},
|
|
229
|
+
this.dtoTransition(),
|
|
230
|
+
],
|
|
209
231
|
onError: 'error.logout',
|
|
210
232
|
},
|
|
211
233
|
entry: [
|
|
@@ -236,7 +258,15 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
236
258
|
invoke: {
|
|
237
259
|
id: 'forgotPasswordFetcher',
|
|
238
260
|
src: fetchMachine.machine,
|
|
239
|
-
onDone:
|
|
261
|
+
onDone: [
|
|
262
|
+
{
|
|
263
|
+
guard: 'isFetchError',
|
|
264
|
+
target: 'error.forgotPassword',
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
target: 'feedback.forgotPassword',
|
|
268
|
+
},
|
|
269
|
+
],
|
|
240
270
|
onError: 'error.forgotPassword',
|
|
241
271
|
},
|
|
242
272
|
entry: [
|
|
@@ -257,6 +287,10 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
257
287
|
id: 'changePasswordFetcher',
|
|
258
288
|
src: fetchMachine.machine,
|
|
259
289
|
onDone: [
|
|
290
|
+
{
|
|
291
|
+
guard: 'isFetchError',
|
|
292
|
+
target: 'error.changePassword',
|
|
293
|
+
},
|
|
260
294
|
{
|
|
261
295
|
guard: 'is200NackDTO',
|
|
262
296
|
target: 'error.changePassword',
|
|
@@ -294,19 +328,29 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
294
328
|
invoke: {
|
|
295
329
|
id: 'resetPasswordFetcher',
|
|
296
330
|
src: fetchMachine.machine,
|
|
297
|
-
onDone:
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
331
|
+
onDone: [
|
|
332
|
+
{
|
|
333
|
+
guard: 'isFetchError',
|
|
334
|
+
target: 'error.resetPassword',
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
guard: 'is200NackDTO',
|
|
338
|
+
target: 'error.resetPassword',
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
actions: [
|
|
342
|
+
({ context }) => {
|
|
343
|
+
const params = context.params;
|
|
344
|
+
this.cm.storeCredentials({
|
|
345
|
+
id: params.username,
|
|
346
|
+
name: params.username,
|
|
347
|
+
password: params.newPassword,
|
|
348
|
+
});
|
|
349
|
+
},
|
|
350
|
+
],
|
|
351
|
+
target: 'feedback.resetPassword',
|
|
352
|
+
},
|
|
353
|
+
],
|
|
310
354
|
onError: 'error.resetPassword',
|
|
311
355
|
},
|
|
312
356
|
entry: [
|
|
@@ -329,10 +373,16 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
329
373
|
invoke: {
|
|
330
374
|
id: 'acceptTermsFetcher',
|
|
331
375
|
src: fetchMachine.machine,
|
|
332
|
-
onDone:
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
376
|
+
onDone: [
|
|
377
|
+
{
|
|
378
|
+
guard: 'isFetchError',
|
|
379
|
+
target: '#authMachine.idle',
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
actions: ['refreshLogin'],
|
|
383
|
+
target: '#authMachine.idle',
|
|
384
|
+
},
|
|
385
|
+
],
|
|
336
386
|
onError: '#authMachine.idle',
|
|
337
387
|
},
|
|
338
388
|
entry: [
|
|
@@ -486,7 +536,14 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
486
536
|
},
|
|
487
537
|
after: {
|
|
488
538
|
feedbackDelay: {
|
|
489
|
-
actions:
|
|
539
|
+
actions: [
|
|
540
|
+
assign(({ context }) => {
|
|
541
|
+
var _a;
|
|
542
|
+
(_a = context.errors) === null || _a === void 0 ? void 0 : _a.clear();
|
|
543
|
+
return { error: undefined };
|
|
544
|
+
}),
|
|
545
|
+
'loginRedirect',
|
|
546
|
+
],
|
|
490
547
|
target: '#authMachine.idle',
|
|
491
548
|
},
|
|
492
549
|
},
|
|
@@ -616,7 +673,11 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
616
673
|
}
|
|
617
674
|
},
|
|
618
675
|
setError,
|
|
619
|
-
resetContext: assign(() =>
|
|
676
|
+
resetContext: assign(({ context }) => {
|
|
677
|
+
var _a;
|
|
678
|
+
(_a = context.errors) === null || _a === void 0 ? void 0 : _a.clear();
|
|
679
|
+
return Object.assign(Object.assign({}, this.startingContext), { errors: context.errors, error: undefined });
|
|
680
|
+
}),
|
|
620
681
|
preventSilentAccess: () => __awaiter(this, void 0, void 0, function* () {
|
|
621
682
|
yield this.cm.preventSilentAccess();
|
|
622
683
|
}),
|
|
@@ -652,7 +713,13 @@ let DefaultAuthMachine = class DefaultAuthMachine extends AbstractMachine {
|
|
|
652
713
|
hasSSOToken: ({ context }) => isQueryParams(context.params) && context.params.SSO_TOKEN !== undefined,
|
|
653
714
|
hasMFACode: ({ context }) => isQueryParams(context.params) && context.params.MFA_CODE !== undefined,
|
|
654
715
|
hasWindowOpener: () => window.opener,
|
|
655
|
-
isUnauthorizedError: ({ event }) =>
|
|
716
|
+
isUnauthorizedError: ({ event }) => {
|
|
717
|
+
if (isErrorEvent(event)) {
|
|
718
|
+
return isUnauthorizedError(event.data);
|
|
719
|
+
}
|
|
720
|
+
return isDoneInvokeEvent(event) ? isUnauthorizedError(event.output) : false;
|
|
721
|
+
},
|
|
722
|
+
isFetchError: ({ event }) => isDoneInvokeEvent(event) ? event.output instanceof Error : false,
|
|
656
723
|
isAuthenticated: ({ context }) => { var _a; return (_a = context.user) === null || _a === void 0 ? void 0 : _a.isAuthenticated; },
|
|
657
724
|
isBanned: ({ context }) => { var _a; return (_a = context.user) === null || _a === void 0 ? void 0 : _a.isBanned(); },
|
|
658
725
|
isLoginAckEntity: ({ event }) => isDoneInvokeEvent(event) ? isLoginAckEntity(event.output) : false,
|
package/dist/esm/mapper/utils.js
CHANGED
|
@@ -44,7 +44,7 @@ const getNormalisedStatusCode = (arr) => {
|
|
|
44
44
|
* @returns A combined text string.
|
|
45
45
|
* @internal
|
|
46
46
|
*/
|
|
47
|
-
export const getNormalisedText = (arr) => Array.isArray(arr) && arr.length ? arr.map((msg) => msg.text).join('
|
|
47
|
+
export const getNormalisedText = (arr) => Array.isArray(arr) && arr.length ? arr.map((msg) => msg.text).join('\n') : undefined;
|
|
48
48
|
/**
|
|
49
49
|
* hasDTOErrorWarningCode
|
|
50
50
|
* @remarks
|
package/dist/esm/routes/base.js
CHANGED
|
@@ -372,7 +372,7 @@ let MessageElement = class MessageElement extends FASTElement {
|
|
|
372
372
|
const translateHelper = (metaMessage) => this.i18next.t(`${defaultAuthConfig.name}:${metaMessage}`, { lng: this.i18next.language });
|
|
373
373
|
const meta = this.store.metaMessages.map(translateHelper).join('\n');
|
|
374
374
|
const error = this.store.errorMessages.map(translateHelper).join('\n');
|
|
375
|
-
return
|
|
375
|
+
return error || meta;
|
|
376
376
|
}
|
|
377
377
|
get hasError() {
|
|
378
378
|
return this.store.errorMessages.length > 0;
|
|
@@ -24,8 +24,24 @@ let ResetPassword = class ResetPassword extends BaseRoute {
|
|
|
24
24
|
this.passwordResetToken = '';
|
|
25
25
|
}
|
|
26
26
|
enter(phase) {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
var _a, _b, _c, _d;
|
|
28
|
+
const query = ((_a = phase.route) === null || _a === void 0 ? void 0 : _a.queryParams) || {};
|
|
29
|
+
this.hasPasswordExpired = !!query.expired;
|
|
30
|
+
this.passwordResetToken = (_b = query.password) !== null && _b !== void 0 ? _b : '';
|
|
31
|
+
if (this.hasPasswordExpired) {
|
|
32
|
+
const username = (_d = (_c = this.store.authMachine.context.params) === null || _c === void 0 ? void 0 : _c.username) === null || _d === void 0 ? void 0 : _d.trim();
|
|
33
|
+
if (username) {
|
|
34
|
+
this.$emit('auth-username-changed', username);
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (!this.passwordResetToken) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const username = (query.username || query.user || query.USER_NAME || '').trim();
|
|
42
|
+
if (username) {
|
|
43
|
+
this.$emit('auth-username-changed', username);
|
|
44
|
+
}
|
|
29
45
|
}
|
|
30
46
|
onSubmit() {
|
|
31
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"FIELD_PASSWORD_REPEAT_NEW_TITLE": "Repeat New Password",
|
|
44
44
|
"MESSAGE_PASSWORD_CHANGE_SUCCESS": "Password change success.",
|
|
45
45
|
"MESSAGE_FORGOT_PASSWORD_RESET": "Please check your inbox for reset instructions.",
|
|
46
|
-
"MESSAGE_PASSWORD_RESET_SUCCESS": "Password reset success.",
|
|
46
|
+
"MESSAGE_PASSWORD_RESET_SUCCESS": "Password reset success. Redirecting to login.",
|
|
47
47
|
"MESSAGE_INCORRECT_CREDENTIALS": "Incorrect credentials, please try again.",
|
|
48
48
|
"MESSAGE_MFA_REQUIRED": "Please check your inbox for your login link.",
|
|
49
49
|
"MESSAGE_PASSWORD_EXPIRED": "You are required to change your password.",
|
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.
|
|
4
|
+
"version": "15.15.0-FUI-2603.5",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/foundation-auth.d.ts",
|
|
@@ -134,25 +134,25 @@
|
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
|
-
"@genesislcap/foundation-testing": "15.
|
|
138
|
-
"@genesislcap/genx": "15.
|
|
139
|
-
"@genesislcap/rollup-builder": "15.
|
|
140
|
-
"@genesislcap/ts-builder": "15.
|
|
141
|
-
"@genesislcap/uvu-playwright-builder": "15.
|
|
142
|
-
"@genesislcap/vite-builder": "15.
|
|
143
|
-
"@genesislcap/webpack-builder": "15.
|
|
137
|
+
"@genesislcap/foundation-testing": "15.15.0-FUI-2603.5",
|
|
138
|
+
"@genesislcap/genx": "15.15.0-FUI-2603.5",
|
|
139
|
+
"@genesislcap/rollup-builder": "15.15.0-FUI-2603.5",
|
|
140
|
+
"@genesislcap/ts-builder": "15.15.0-FUI-2603.5",
|
|
141
|
+
"@genesislcap/uvu-playwright-builder": "15.15.0-FUI-2603.5",
|
|
142
|
+
"@genesislcap/vite-builder": "15.15.0-FUI-2603.5",
|
|
143
|
+
"@genesislcap/webpack-builder": "15.15.0-FUI-2603.5"
|
|
144
144
|
},
|
|
145
145
|
"dependencies": {
|
|
146
|
-
"@genesislcap/foundation-comms": "15.
|
|
147
|
-
"@genesislcap/foundation-events": "15.
|
|
148
|
-
"@genesislcap/foundation-i18n": "15.
|
|
149
|
-
"@genesislcap/foundation-logger": "15.
|
|
150
|
-
"@genesislcap/foundation-state-machine": "15.
|
|
151
|
-
"@genesislcap/foundation-store": "15.
|
|
152
|
-
"@genesislcap/foundation-ui": "15.
|
|
153
|
-
"@genesislcap/foundation-user": "15.
|
|
154
|
-
"@genesislcap/foundation-utils": "15.
|
|
155
|
-
"@genesislcap/foundation-zero": "15.
|
|
146
|
+
"@genesislcap/foundation-comms": "15.15.0-FUI-2603.5",
|
|
147
|
+
"@genesislcap/foundation-events": "15.15.0-FUI-2603.5",
|
|
148
|
+
"@genesislcap/foundation-i18n": "15.15.0-FUI-2603.5",
|
|
149
|
+
"@genesislcap/foundation-logger": "15.15.0-FUI-2603.5",
|
|
150
|
+
"@genesislcap/foundation-state-machine": "15.15.0-FUI-2603.5",
|
|
151
|
+
"@genesislcap/foundation-store": "15.15.0-FUI-2603.5",
|
|
152
|
+
"@genesislcap/foundation-ui": "15.15.0-FUI-2603.5",
|
|
153
|
+
"@genesislcap/foundation-user": "15.15.0-FUI-2603.5",
|
|
154
|
+
"@genesislcap/foundation-utils": "15.15.0-FUI-2603.5",
|
|
155
|
+
"@genesislcap/foundation-zero": "15.15.0-FUI-2603.5",
|
|
156
156
|
"@microsoft/fast-components": "2.30.6",
|
|
157
157
|
"@microsoft/fast-element": "1.14.0",
|
|
158
158
|
"@microsoft/fast-foundation": "2.50.0",
|
|
@@ -173,5 +173,5 @@
|
|
|
173
173
|
"access": "public"
|
|
174
174
|
},
|
|
175
175
|
"customElements": "dist/custom-elements.json",
|
|
176
|
-
"gitHead": "
|
|
176
|
+
"gitHead": "f64026794fa925cfd4ee56af026663a094040603"
|
|
177
177
|
}
|