@lenne.tech/ng-base 22.0.4 → 22.1.0
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/CLAUDE.md +5 -0
- package/README.md +34 -7
- package/fesm2022/lenne.tech-ng-base-ai.mjs +27 -27
- package/fesm2022/lenne.tech-ng-base-auth-provide.mjs +15 -14
- package/fesm2022/lenne.tech-ng-base-auth-provide.mjs.map +1 -1
- package/fesm2022/lenne.tech-ng-base-auth.mjs +17 -13
- package/fesm2022/lenne.tech-ng-base-auth.mjs.map +1 -1
- package/fesm2022/{lenne.tech-ng-base-bug-bug-report-dialog-BRzVmKJr.mjs → lenne.tech-ng-base-bug-bug-report-dialog-f6VNOWnW.mjs} +11 -11
- package/fesm2022/{lenne.tech-ng-base-bug-bug-report-dialog-BRzVmKJr.mjs.map → lenne.tech-ng-base-bug-bug-report-dialog-f6VNOWnW.mjs.map} +1 -1
- package/fesm2022/{lenne.tech-ng-base-bug-bug-report-service-DWoTb_iw.mjs → lenne.tech-ng-base-bug-bug-report-service-D6slR3GD.mjs} +4 -4
- package/fesm2022/{lenne.tech-ng-base-bug-bug-report-service-DWoTb_iw.mjs.map → lenne.tech-ng-base-bug-bug-report-service-D6slR3GD.mjs.map} +1 -1
- package/fesm2022/lenne.tech-ng-base-bug.mjs +5 -5
- package/fesm2022/lenne.tech-ng-base-files-ui.mjs +3 -3
- package/fesm2022/lenne.tech-ng-base-files.mjs +8 -4
- package/fesm2022/lenne.tech-ng-base-files.mjs.map +1 -1
- package/fesm2022/lenne.tech-ng-base-share.mjs +3 -3
- package/fesm2022/lenne.tech-ng-base-ui-provide.mjs +3 -3
- package/fesm2022/lenne.tech-ng-base-ui.mjs +1206 -1216
- package/fesm2022/lenne.tech-ng-base-ui.mjs.map +1 -1
- package/fesm2022/lenne.tech-ng-base-utils.mjs +9 -9
- package/fesm2022/lenne.tech-ng-base.mjs +27 -24
- package/fesm2022/lenne.tech-ng-base.mjs.map +1 -1
- package/i18n/auth/de.json +1 -3
- package/i18n/auth/en.json +1 -3
- package/i18n/de.json +1 -2
- package/i18n/en.json +1 -2
- package/i18n/ui/de.json +0 -5
- package/i18n/ui/en.json +0 -5
- package/package.json +5 -1
- package/types/lenne.tech-ng-base-auth-provide.d.ts +2 -3
- package/types/lenne.tech-ng-base-auth.d.ts +4 -1
- package/types/lenne.tech-ng-base-files.d.ts +5 -1
- package/types/lenne.tech-ng-base.d.ts +8 -1
package/CLAUDE.md
CHANGED
|
@@ -28,6 +28,11 @@ relatively. Changes to the vendored core belong upstream in `lenneTech/ng-base`.
|
|
|
28
28
|
|
|
29
29
|
- Auth goes through `LtAuthService` only. Never send a plaintext password: the service hashes every credential
|
|
30
30
|
(SHA-256) itself, so pass the raw form value once and never hash it yourself as well.
|
|
31
|
+
- `lt-jwt-token` holds a JWT or nothing. After a passkey or 2FA sign-in never store a token yourself:
|
|
32
|
+
`authenticateWithPasskey()` returns `{ success, error?, user? }`, and `twoFactor.verifyTotp()` / `verifyBackupCode()`
|
|
33
|
+
set the session and return no session token.
|
|
34
|
+
- SSR backend calls are anonymous (also `fetchWithAuth`): load user data in the browser (`afterNextRender()`, or a
|
|
35
|
+
resource that only starts when `isPlatformBrowser(…)`), render public data on the server, never decide access there.
|
|
31
36
|
- `lt-auth-state` is a UI cache. Guards (`ltAuthGuard`, `ltRoleGuard`) gate UI only; the backend authorises every
|
|
32
37
|
request. Do not build security decisions on `isAdmin()`.
|
|
33
38
|
- Redirect/callback URLs for auth mails are absolute app URLs from `NG_PUBLIC_SITE_URL` (`LtAuthService.absoluteAppUrl`),
|
package/README.md
CHANGED
|
@@ -153,6 +153,31 @@ root route `canActivateChild: [ltSystemSetupGuard]`. Import the guards, `ltAuthI
|
|
|
153
153
|
no Better Auth, 2FA or passkey code. `LtAuthService` (`/auth`) shares the same state and belongs on the pages that sign
|
|
154
154
|
in, register, verify 2FA or manage passkeys. `/auth` re-exports everything of `/auth/provide`, so either import works.
|
|
155
155
|
|
|
156
|
+
`lt-jwt-token` holds a JWT or nothing. After 2FA or a passkey sign-in never store a token yourself: the service puts the
|
|
157
|
+
session in place, `authenticateWithPasskey()` returns `{ success, error?, user? }`, and `twoFactor.verifyTotp()` /
|
|
158
|
+
`verifyBackupCode()` drop Better Auth's opaque session token from their answer (a JWT of `cookies: false` stays).
|
|
159
|
+
|
|
160
|
+
## Server-side rendering: backend calls are anonymous
|
|
161
|
+
|
|
162
|
+
During SSR every API call of ng-base goes out **without** the user's session: `LT_FETCH` / `fetchWithAuth`,
|
|
163
|
+
`ltAuthInterceptor`, the AI services and offline sync. The server takes the auth state from the `lt-auth-state` cookie,
|
|
164
|
+
a display cache for UI gating and no proof of a session, and never reads `lt-jwt-token`; Node's `fetch` does not forward
|
|
165
|
+
the browser's cookies. The session cookie `iam.session_token` belongs to the API host anyway (host-only unless
|
|
166
|
+
nest-server's `crossSubDomainCookies` is set), so the app server usually never receives it.
|
|
167
|
+
|
|
168
|
+
For pages that show user data:
|
|
169
|
+
|
|
170
|
+
- **Load it in the browser**, for example in `afterNextRender()` or a resource that only starts when
|
|
171
|
+
`isPlatformBrowser(…)`, with a skeleton for the first paint. `resource()` / `httpResource()` run during SSR too.
|
|
172
|
+
- **Render only public data on the server**, and never decide access there: a guard that reads `lt-auth-state` decides
|
|
173
|
+
what to render, the API decides what the user may see.
|
|
174
|
+
- If a page truly needs user data in the SSR HTML, that needs a route of the app's own server that forwards the
|
|
175
|
+
request's session to the API, set up per project together with a shared cookie domain. ng-base does not do it.
|
|
176
|
+
|
|
177
|
+
Unlike nuxt-extensions, `fetchWithAuth` is anonymous during SSR too (nuxt-extensions sends the request's `lt-jwt-token`
|
|
178
|
+
as bearer there): no SSR output depends on one user's token, and a cached route can never serve one user's data to the
|
|
179
|
+
next.
|
|
180
|
+
|
|
156
181
|
## Texts (de/en)
|
|
157
182
|
|
|
158
183
|
Library texts are German and English, chosen by the browser language, `LtI18nService.setLocale()` or an app i18n
|
|
@@ -221,19 +246,23 @@ Differences to bug.lt 1.6.9:
|
|
|
221
246
|
has no subtree error capture): the app's `ErrorHandler` is wrapped (it keeps handling every error) and
|
|
222
247
|
`LtBugReportService.reportError()` reports by hand; `LtBugReportService.open()` replaces `useBugReport().openModal()`.
|
|
223
248
|
|
|
224
|
-
## Differences to nuxt-extensions
|
|
249
|
+
## Differences to nuxt-extensions 4.0.1
|
|
250
|
+
|
|
251
|
+
ng-base follows nuxt-extensions release for release (last compared: 1.26.0 to 4.0.1). Behaviour that is the same in both
|
|
252
|
+
(2FA and passkey sign-in never expose the session token, one auth fetch with JWT renewal and `basePath`, file URLs on the
|
|
253
|
+
API with `GET /files/id/:id`, TUS on `/tus`, `enableAdmin` off with a warning, error translations that never hold back the
|
|
254
|
+
start, `includeDisabled` for AI prompts) is not listed. What differs on purpose:
|
|
225
255
|
|
|
226
256
|
- Composables with per-call state are `inject…()` factories bound to the injection context (`injectLtTusUpload()`,
|
|
227
257
|
`injectLtAiChat()`, `injectLtOfflineSync()`); shared state lives in root services (`LtAuthService`, `LtAi…Service`).
|
|
228
|
-
-
|
|
229
|
-
|
|
230
|
-
|
|
258
|
+
- `fetchWithAuth` is anonymous during SSR too (see "Server-side rendering: backend calls are anonymous").
|
|
259
|
+
- Transitions use Angular `animate.enter` / `animate.leave` classes with CSS variables for the durations, no Tailwind
|
|
260
|
+
duration utilities.
|
|
231
261
|
- nest-server's real JWT mode (`cookies: false`, env `NSC__COOKIES=false`) works end to end: a JWT in a sign-in, 2FA or
|
|
232
262
|
passkey answer puts the store into JWT mode, session checks keep the mode (a bearer-proven session never falls back to
|
|
233
263
|
cookie mode), and a JWT expiring within 60 s is refreshed with itself as bearer before it is sent (nest-server's JWTs
|
|
234
264
|
live 15 minutes and there is no cookie to mint a new one). An opaque Better Auth session token is never stored. Before
|
|
235
265
|
nest-server 12.7.0 the browser must reach the API same-origin in this mode (`NG_PUBLIC_API_PROXY=true`).
|
|
236
|
-
- The Better Auth admin plugin is off by default (`enableAdmin`), nest-server does not serve it.
|
|
237
266
|
- Passkeys work without `@better-auth/passkey` (WebAuthn calls go straight to `/iam/passkey/*`); the plugin can still be
|
|
238
267
|
passed via `provideLtAuth({ plugins })`.
|
|
239
268
|
- Pre-hydration input is preserved (`provideLtNgBase({ preHydrationInput })`, on by default): the first change
|
|
@@ -242,8 +271,6 @@ Differences to bug.lt 1.6.9:
|
|
|
242
271
|
HTML that blocks the native submit of forms without `action` before hydration (no password in a GET URL).
|
|
243
272
|
- Not ported: the form-label association repair (a Nuxt UI/reka-ui id divergence that Angular's id handling does not
|
|
244
273
|
have).
|
|
245
|
-
- File URLs use nest-server 12.5's real routes (`/files/id/:id`, `/files/info/:id`); nuxt-extensions built
|
|
246
|
-
`/files/:id` and `/files/download/:id`, which answer 404.
|
|
247
274
|
|
|
248
275
|
## Vendor mode
|
|
249
276
|
|
|
@@ -53,7 +53,7 @@ var LtAiHttpService = class LtAiHttpService {
|
|
|
53
53
|
}
|
|
54
54
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
55
55
|
minVersion: "12.0.0",
|
|
56
|
-
version: "22.2.
|
|
56
|
+
version: "22.2.5",
|
|
57
57
|
ngImport: i0,
|
|
58
58
|
type: LtAiHttpService,
|
|
59
59
|
deps: [],
|
|
@@ -61,14 +61,14 @@ var LtAiHttpService = class LtAiHttpService {
|
|
|
61
61
|
});
|
|
62
62
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
63
63
|
minVersion: "22.0.0",
|
|
64
|
-
version: "22.2.
|
|
64
|
+
version: "22.2.5",
|
|
65
65
|
ngImport: i0,
|
|
66
66
|
type: LtAiHttpService
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
69
|
i0.ɵɵngDeclareClassMetadata({
|
|
70
70
|
minVersion: "12.0.0",
|
|
71
|
-
version: "22.2.
|
|
71
|
+
version: "22.2.5",
|
|
72
72
|
ngImport: i0,
|
|
73
73
|
type: LtAiHttpService,
|
|
74
74
|
decorators: [{ type: Service }]
|
|
@@ -384,7 +384,7 @@ var LtAiAdminService = class LtAiAdminService {
|
|
|
384
384
|
listInteractions = () => this.http.request("GET", "/interactions");
|
|
385
385
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
386
386
|
minVersion: "12.0.0",
|
|
387
|
-
version: "22.2.
|
|
387
|
+
version: "22.2.5",
|
|
388
388
|
ngImport: i0,
|
|
389
389
|
type: LtAiAdminService,
|
|
390
390
|
deps: [],
|
|
@@ -392,14 +392,14 @@ var LtAiAdminService = class LtAiAdminService {
|
|
|
392
392
|
});
|
|
393
393
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
394
394
|
minVersion: "22.0.0",
|
|
395
|
-
version: "22.2.
|
|
395
|
+
version: "22.2.5",
|
|
396
396
|
ngImport: i0,
|
|
397
397
|
type: LtAiAdminService
|
|
398
398
|
});
|
|
399
399
|
};
|
|
400
400
|
i0.ɵɵngDeclareClassMetadata({
|
|
401
401
|
minVersion: "12.0.0",
|
|
402
|
-
version: "22.2.
|
|
402
|
+
version: "22.2.5",
|
|
403
403
|
ngImport: i0,
|
|
404
404
|
type: LtAiAdminService,
|
|
405
405
|
decorators: [{ type: Service }]
|
|
@@ -425,7 +425,7 @@ var LtAiConnectionsService = class LtAiConnectionsService {
|
|
|
425
425
|
}
|
|
426
426
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
427
427
|
minVersion: "12.0.0",
|
|
428
|
-
version: "22.2.
|
|
428
|
+
version: "22.2.5",
|
|
429
429
|
ngImport: i0,
|
|
430
430
|
type: LtAiConnectionsService,
|
|
431
431
|
deps: [],
|
|
@@ -433,14 +433,14 @@ var LtAiConnectionsService = class LtAiConnectionsService {
|
|
|
433
433
|
});
|
|
434
434
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
435
435
|
minVersion: "22.0.0",
|
|
436
|
-
version: "22.2.
|
|
436
|
+
version: "22.2.5",
|
|
437
437
|
ngImport: i0,
|
|
438
438
|
type: LtAiConnectionsService
|
|
439
439
|
});
|
|
440
440
|
};
|
|
441
441
|
i0.ɵɵngDeclareClassMetadata({
|
|
442
442
|
minVersion: "12.0.0",
|
|
443
|
-
version: "22.2.
|
|
443
|
+
version: "22.2.5",
|
|
444
444
|
ngImport: i0,
|
|
445
445
|
type: LtAiConnectionsService,
|
|
446
446
|
decorators: [{ type: Service }]
|
|
@@ -463,7 +463,7 @@ var LtAiPlaceholdersService = class LtAiPlaceholdersService {
|
|
|
463
463
|
}
|
|
464
464
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
465
465
|
minVersion: "12.0.0",
|
|
466
|
-
version: "22.2.
|
|
466
|
+
version: "22.2.5",
|
|
467
467
|
ngImport: i0,
|
|
468
468
|
type: LtAiPlaceholdersService,
|
|
469
469
|
deps: [],
|
|
@@ -471,14 +471,14 @@ var LtAiPlaceholdersService = class LtAiPlaceholdersService {
|
|
|
471
471
|
});
|
|
472
472
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
473
473
|
minVersion: "22.0.0",
|
|
474
|
-
version: "22.2.
|
|
474
|
+
version: "22.2.5",
|
|
475
475
|
ngImport: i0,
|
|
476
476
|
type: LtAiPlaceholdersService
|
|
477
477
|
});
|
|
478
478
|
};
|
|
479
479
|
i0.ɵɵngDeclareClassMetadata({
|
|
480
480
|
minVersion: "12.0.0",
|
|
481
|
-
version: "22.2.
|
|
481
|
+
version: "22.2.5",
|
|
482
482
|
ngImport: i0,
|
|
483
483
|
type: LtAiPlaceholdersService,
|
|
484
484
|
decorators: [{ type: Service }]
|
|
@@ -522,7 +522,7 @@ var LtAiPromptsService = class LtAiPromptsService {
|
|
|
522
522
|
}
|
|
523
523
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
524
524
|
minVersion: "12.0.0",
|
|
525
|
-
version: "22.2.
|
|
525
|
+
version: "22.2.5",
|
|
526
526
|
ngImport: i0,
|
|
527
527
|
type: LtAiPromptsService,
|
|
528
528
|
deps: [],
|
|
@@ -530,14 +530,14 @@ var LtAiPromptsService = class LtAiPromptsService {
|
|
|
530
530
|
});
|
|
531
531
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
532
532
|
minVersion: "22.0.0",
|
|
533
|
-
version: "22.2.
|
|
533
|
+
version: "22.2.5",
|
|
534
534
|
ngImport: i0,
|
|
535
535
|
type: LtAiPromptsService
|
|
536
536
|
});
|
|
537
537
|
};
|
|
538
538
|
i0.ɵɵngDeclareClassMetadata({
|
|
539
539
|
minVersion: "12.0.0",
|
|
540
|
-
version: "22.2.
|
|
540
|
+
version: "22.2.5",
|
|
541
541
|
ngImport: i0,
|
|
542
542
|
type: LtAiPromptsService,
|
|
543
543
|
decorators: [{ type: Service }]
|
|
@@ -572,7 +572,7 @@ var LtAiService = class LtAiService {
|
|
|
572
572
|
}
|
|
573
573
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
574
574
|
minVersion: "12.0.0",
|
|
575
|
-
version: "22.2.
|
|
575
|
+
version: "22.2.5",
|
|
576
576
|
ngImport: i0,
|
|
577
577
|
type: LtAiService,
|
|
578
578
|
deps: [],
|
|
@@ -580,14 +580,14 @@ var LtAiService = class LtAiService {
|
|
|
580
580
|
});
|
|
581
581
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
582
582
|
minVersion: "22.0.0",
|
|
583
|
-
version: "22.2.
|
|
583
|
+
version: "22.2.5",
|
|
584
584
|
ngImport: i0,
|
|
585
585
|
type: LtAiService
|
|
586
586
|
});
|
|
587
587
|
};
|
|
588
588
|
i0.ɵɵngDeclareClassMetadata({
|
|
589
589
|
minVersion: "12.0.0",
|
|
590
|
-
version: "22.2.
|
|
590
|
+
version: "22.2.5",
|
|
591
591
|
ngImport: i0,
|
|
592
592
|
type: LtAiService,
|
|
593
593
|
decorators: [{ type: Service }]
|
|
@@ -612,7 +612,7 @@ var LtAiSettingsService = class LtAiSettingsService {
|
|
|
612
612
|
}
|
|
613
613
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
614
614
|
minVersion: "12.0.0",
|
|
615
|
-
version: "22.2.
|
|
615
|
+
version: "22.2.5",
|
|
616
616
|
ngImport: i0,
|
|
617
617
|
type: LtAiSettingsService,
|
|
618
618
|
deps: [],
|
|
@@ -620,14 +620,14 @@ var LtAiSettingsService = class LtAiSettingsService {
|
|
|
620
620
|
});
|
|
621
621
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
622
622
|
minVersion: "22.0.0",
|
|
623
|
-
version: "22.2.
|
|
623
|
+
version: "22.2.5",
|
|
624
624
|
ngImport: i0,
|
|
625
625
|
type: LtAiSettingsService
|
|
626
626
|
});
|
|
627
627
|
};
|
|
628
628
|
i0.ɵɵngDeclareClassMetadata({
|
|
629
629
|
minVersion: "12.0.0",
|
|
630
|
-
version: "22.2.
|
|
630
|
+
version: "22.2.5",
|
|
631
631
|
ngImport: i0,
|
|
632
632
|
type: LtAiSettingsService,
|
|
633
633
|
decorators: [{ type: Service }]
|
|
@@ -712,7 +712,7 @@ var LtAiStatusService = class LtAiStatusService {
|
|
|
712
712
|
}
|
|
713
713
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
714
714
|
minVersion: "12.0.0",
|
|
715
|
-
version: "22.2.
|
|
715
|
+
version: "22.2.5",
|
|
716
716
|
ngImport: i0,
|
|
717
717
|
type: LtAiStatusService,
|
|
718
718
|
deps: [],
|
|
@@ -720,14 +720,14 @@ var LtAiStatusService = class LtAiStatusService {
|
|
|
720
720
|
});
|
|
721
721
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
722
722
|
minVersion: "22.0.0",
|
|
723
|
-
version: "22.2.
|
|
723
|
+
version: "22.2.5",
|
|
724
724
|
ngImport: i0,
|
|
725
725
|
type: LtAiStatusService
|
|
726
726
|
});
|
|
727
727
|
};
|
|
728
728
|
i0.ɵɵngDeclareClassMetadata({
|
|
729
729
|
minVersion: "12.0.0",
|
|
730
|
-
version: "22.2.
|
|
730
|
+
version: "22.2.5",
|
|
731
731
|
ngImport: i0,
|
|
732
732
|
type: LtAiStatusService,
|
|
733
733
|
decorators: [{ type: Service }]
|
|
@@ -746,7 +746,7 @@ var LtAiUsageService = class LtAiUsageService {
|
|
|
746
746
|
}
|
|
747
747
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
748
748
|
minVersion: "12.0.0",
|
|
749
|
-
version: "22.2.
|
|
749
|
+
version: "22.2.5",
|
|
750
750
|
ngImport: i0,
|
|
751
751
|
type: LtAiUsageService,
|
|
752
752
|
deps: [],
|
|
@@ -754,14 +754,14 @@ var LtAiUsageService = class LtAiUsageService {
|
|
|
754
754
|
});
|
|
755
755
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
756
756
|
minVersion: "22.0.0",
|
|
757
|
-
version: "22.2.
|
|
757
|
+
version: "22.2.5",
|
|
758
758
|
ngImport: i0,
|
|
759
759
|
type: LtAiUsageService
|
|
760
760
|
});
|
|
761
761
|
};
|
|
762
762
|
i0.ɵɵngDeclareClassMetadata({
|
|
763
763
|
minVersion: "12.0.0",
|
|
764
|
-
version: "22.2.
|
|
764
|
+
version: "22.2.5",
|
|
765
765
|
ngImport: i0,
|
|
766
766
|
type: LtAiUsageService,
|
|
767
767
|
decorators: [{ type: Service }]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { InjectionToken, Injector, PLATFORM_ID, Service, TransferState, computed, inject, makeEnvironmentProviders, makeStateKey, provideAppInitializer, signal } from "@angular/core";
|
|
3
3
|
import { Router } from "@angular/router";
|
|
4
|
-
import { LT_FETCH, LT_RUNTIME_CONFIG, LtApiUrlService, LtCookieService, isLtAbsoluteUrl, ltCredentialsFetch, ltSha256, mergeLtFeatureOptions } from "@lenne.tech/ng-base";
|
|
4
|
+
import { LT_FETCH, LT_RUNTIME_CONFIG, LtApiUrlService, LtCookieService, isLtAbsoluteUrl, ltCredentialsFetch, ltSha256, mergeLtFeatureOptions, warnLtOnce } from "@lenne.tech/ng-base";
|
|
5
5
|
import { DOCUMENT, isPlatformServer } from "@angular/common";
|
|
6
6
|
import { HttpErrorResponse } from "@angular/common/http";
|
|
7
7
|
import { catchError, from, switchMap, throwError } from "rxjs";
|
|
@@ -165,7 +165,7 @@ var LtAuthStateService = class LtAuthStateService {
|
|
|
165
165
|
}
|
|
166
166
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
167
167
|
minVersion: "12.0.0",
|
|
168
|
-
version: "22.2.
|
|
168
|
+
version: "22.2.5",
|
|
169
169
|
ngImport: i0,
|
|
170
170
|
type: LtAuthStateService,
|
|
171
171
|
deps: [],
|
|
@@ -173,14 +173,14 @@ var LtAuthStateService = class LtAuthStateService {
|
|
|
173
173
|
});
|
|
174
174
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
175
175
|
minVersion: "22.0.0",
|
|
176
|
-
version: "22.2.
|
|
176
|
+
version: "22.2.5",
|
|
177
177
|
ngImport: i0,
|
|
178
178
|
type: LtAuthStateService
|
|
179
179
|
});
|
|
180
180
|
};
|
|
181
181
|
i0.ɵɵngDeclareClassMetadata({
|
|
182
182
|
minVersion: "12.0.0",
|
|
183
|
-
version: "22.2.
|
|
183
|
+
version: "22.2.5",
|
|
184
184
|
ngImport: i0,
|
|
185
185
|
type: LtAuthStateService,
|
|
186
186
|
decorators: [{ type: Service }]
|
|
@@ -657,6 +657,7 @@ var LtAuthStore = class LtAuthStore {
|
|
|
657
657
|
if (body && typeof body === "object" && !Array.isArray(body)) {
|
|
658
658
|
this.featuresState.set(body);
|
|
659
659
|
this.featuresLoaded = true;
|
|
660
|
+
if (this.options.enableAdmin && body["admin"] !== true) warnLtOnce("admin-plugin-unserved", "[@lenne.tech/ng-base] provideLtAuth({ enableAdmin: true }) is set, but the API reports no admin plugin (no `admin` in /iam/features): admin.* calls answer 404, and ng-base does not hash the passwords of admin.createUser / admin.setUserPassword. Switch enableAdmin off unless the backend serves the Better Auth admin routes.");
|
|
660
661
|
if (this.isServer) this.transferState.set(LT_AUTH_FEATURES_STATE_KEY, body);
|
|
661
662
|
}
|
|
662
663
|
}
|
|
@@ -689,7 +690,7 @@ var LtAuthStore = class LtAuthStore {
|
|
|
689
690
|
}
|
|
690
691
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
691
692
|
minVersion: "12.0.0",
|
|
692
|
-
version: "22.2.
|
|
693
|
+
version: "22.2.5",
|
|
693
694
|
ngImport: i0,
|
|
694
695
|
type: LtAuthStore,
|
|
695
696
|
deps: [],
|
|
@@ -697,14 +698,14 @@ var LtAuthStore = class LtAuthStore {
|
|
|
697
698
|
});
|
|
698
699
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
699
700
|
minVersion: "22.0.0",
|
|
700
|
-
version: "22.2.
|
|
701
|
+
version: "22.2.5",
|
|
701
702
|
ngImport: i0,
|
|
702
703
|
type: LtAuthStore
|
|
703
704
|
});
|
|
704
705
|
};
|
|
705
706
|
i0.ɵɵngDeclareClassMetadata({
|
|
706
707
|
minVersion: "12.0.0",
|
|
707
|
-
version: "22.2.
|
|
708
|
+
version: "22.2.5",
|
|
708
709
|
ngImport: i0,
|
|
709
710
|
type: LtAuthStore,
|
|
710
711
|
decorators: [{ type: Service }]
|
|
@@ -802,7 +803,7 @@ var LtSystemSetupService = class LtSystemSetupService {
|
|
|
802
803
|
}
|
|
803
804
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
804
805
|
minVersion: "12.0.0",
|
|
805
|
-
version: "22.2.
|
|
806
|
+
version: "22.2.5",
|
|
806
807
|
ngImport: i0,
|
|
807
808
|
type: LtSystemSetupService,
|
|
808
809
|
deps: [],
|
|
@@ -810,14 +811,14 @@ var LtSystemSetupService = class LtSystemSetupService {
|
|
|
810
811
|
});
|
|
811
812
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
812
813
|
minVersion: "22.0.0",
|
|
813
|
-
version: "22.2.
|
|
814
|
+
version: "22.2.5",
|
|
814
815
|
ngImport: i0,
|
|
815
816
|
type: LtSystemSetupService
|
|
816
817
|
});
|
|
817
818
|
};
|
|
818
819
|
i0.ɵɵngDeclareClassMetadata({
|
|
819
820
|
minVersion: "12.0.0",
|
|
820
|
-
version: "22.2.
|
|
821
|
+
version: "22.2.5",
|
|
821
822
|
ngImport: i0,
|
|
822
823
|
type: LtSystemSetupService,
|
|
823
824
|
decorators: [{ type: Service }]
|
|
@@ -874,7 +875,7 @@ var LtUnauthorizedHandler = class LtUnauthorizedHandler {
|
|
|
874
875
|
}
|
|
875
876
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
876
877
|
minVersion: "12.0.0",
|
|
877
|
-
version: "22.2.
|
|
878
|
+
version: "22.2.5",
|
|
878
879
|
ngImport: i0,
|
|
879
880
|
type: LtUnauthorizedHandler,
|
|
880
881
|
deps: [],
|
|
@@ -882,14 +883,14 @@ var LtUnauthorizedHandler = class LtUnauthorizedHandler {
|
|
|
882
883
|
});
|
|
883
884
|
static ɵprov = i0.ɵɵngDeclareService({
|
|
884
885
|
minVersion: "22.0.0",
|
|
885
|
-
version: "22.2.
|
|
886
|
+
version: "22.2.5",
|
|
886
887
|
ngImport: i0,
|
|
887
888
|
type: LtUnauthorizedHandler
|
|
888
889
|
});
|
|
889
890
|
};
|
|
890
891
|
i0.ɵɵngDeclareClassMetadata({
|
|
891
892
|
minVersion: "12.0.0",
|
|
892
|
-
version: "22.2.
|
|
893
|
+
version: "22.2.5",
|
|
893
894
|
ngImport: i0,
|
|
894
895
|
type: LtUnauthorizedHandler,
|
|
895
896
|
decorators: [{ type: Service }]
|
|
@@ -940,6 +941,6 @@ function provideLtAuth(options = {}) {
|
|
|
940
941
|
})
|
|
941
942
|
]);
|
|
942
943
|
}
|
|
943
|
-
export { LT_AUTH_COOKIE_MAX_AGE, LT_AUTH_COOKIE_PATHS, LT_AUTH_DEFAULTS, LT_AUTH_ENDPOINT_FRAGMENTS, LT_AUTH_FEATURES_STATE_KEY, LT_AUTH_INPUT_OPTIONS, LT_AUTH_OPTIONS, LT_AUTH_PUBLIC_PATHS, LT_AUTH_SIGN_OUT_HOOKS, LT_AUTH_STATE_COOKIE_DEFAULT, LT_JWT_TOKEN_COOKIE_DEFAULT, LT_SYSTEM_SETUP_STATE_KEY, LT_SYSTEM_SETUP_TOKEN_HEADER, LT_VALIDATE_SESSION_TIMEOUT_MS, LtAuthStateService, LtAuthStore, LtSystemSetupService, LtUnauthorizedHandler, hasLtRole, isLtApiRequest, isLtAuthEndpoint, ltAuthGuard, ltAuthInterceptor, ltGuestGuard, ltRoleGuard, ltSystemSetupGuard, provideLtAuth, readLtAuthAnswer, resolveLtAuthCookieNames, resolveLtAuthState, resolveLtCookiePrefix };
|
|
944
|
+
export { LT_AUTH_COOKIE_MAX_AGE, LT_AUTH_COOKIE_PATHS, LT_AUTH_DEFAULTS, LT_AUTH_ENDPOINT_FRAGMENTS, LT_AUTH_FEATURES_STATE_KEY, LT_AUTH_INPUT_OPTIONS, LT_AUTH_OPTIONS, LT_AUTH_PUBLIC_PATHS, LT_AUTH_SIGN_OUT_HOOKS, LT_AUTH_STATE_COOKIE_DEFAULT, LT_JWT_TOKEN_COOKIE_DEFAULT, LT_SYSTEM_SETUP_STATE_KEY, LT_SYSTEM_SETUP_TOKEN_HEADER, LT_VALIDATE_SESSION_TIMEOUT_MS, LtAuthStateService, LtAuthStore, LtSystemSetupService, LtUnauthorizedHandler, hasLtRole, isLtApiRequest, isLtAuthEndpoint, isLtJwtShaped, ltAuthGuard, ltAuthInterceptor, ltGuestGuard, ltRoleGuard, ltSystemSetupGuard, provideLtAuth, readLtAuthAnswer, resolveLtAuthCookieNames, resolveLtAuthState, resolveLtCookiePrefix };
|
|
944
945
|
|
|
945
946
|
//# sourceMappingURL=lenne.tech-ng-base-auth-provide.mjs.map
|