@dereekb/dbx-firebase 13.4.1 → 13.5.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/fesm2022/dereekb-dbx-firebase-oidc.mjs +216 -131
- package/fesm2022/dereekb-dbx-firebase-oidc.mjs.map +1 -1
- package/fesm2022/dereekb-dbx-firebase.mjs +1323 -724
- package/fesm2022/dereekb-dbx-firebase.mjs.map +1 -1
- package/lib/auth/login/_login.scss +1 -20
- package/lib/model/_model.scss +0 -1
- package/lib/model/modules/model/_model.scss +0 -19
- package/lib/style/_all-typography.scss +0 -2
- package/lib/style/_theming.scss +1 -5
- package/package.json +13 -13
- package/types/dereekb-dbx-firebase-oidc.d.ts +97 -10
- package/types/dereekb-dbx-firebase.d.ts +650 -105
|
@@ -6,7 +6,7 @@ $login-button-height: 42px;
|
|
|
6
6
|
$login-button-width: 220px;
|
|
7
7
|
$login-button-content-width: $login-button-width - 20px;
|
|
8
8
|
$login-button-icon-box-size: 28px;
|
|
9
|
-
$login-button-icon-size:
|
|
9
|
+
$login-button-icon-size: 24px;
|
|
10
10
|
|
|
11
11
|
// MARK: Mixin
|
|
12
12
|
@mixin core() {
|
|
@@ -53,24 +53,5 @@ $login-button-icon-size: 18px;
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
@mixin color($theme-config) {
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@mixin typography($theme-config-or-typography-config) {
|
|
60
|
-
}
|
|
61
|
-
|
|
62
56
|
@mixin theme($theme-config) {
|
|
63
|
-
@include theming.private-check-duplicate-theme-styles($theme-config, 'dbx-firebase-login') {
|
|
64
|
-
$color: theming.m2-get-color-config($theme-config);
|
|
65
|
-
$density: theming.m2-get-density-config($theme-config);
|
|
66
|
-
$typography: theming.m2-get-typography-config($theme-config);
|
|
67
|
-
|
|
68
|
-
@if $color !=null {
|
|
69
|
-
@include color($theme-config);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
@if $typography !=null {
|
|
73
|
-
@include typography($theme-config);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
57
|
}
|
package/lib/model/_model.scss
CHANGED
|
@@ -10,24 +10,5 @@ $dbx-firebase-model-entities-expansion-panel-height: 64px;
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
@mixin color($theme-config) {
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@mixin typography($theme-config-or-typography-config) {
|
|
17
|
-
}
|
|
18
|
-
|
|
19
13
|
@mixin theme($theme-config) {
|
|
20
|
-
@include theming.private-check-duplicate-theme-styles($theme-config, 'dbx-firebase-model-model') {
|
|
21
|
-
$color: theming.m2-get-color-config($theme-config);
|
|
22
|
-
$density: theming.m2-get-density-config($theme-config);
|
|
23
|
-
$typography: theming.m2-get-typography-config($theme-config);
|
|
24
|
-
|
|
25
|
-
@if $color !=null {
|
|
26
|
-
@include color($theme-config);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
@if $typography !=null {
|
|
30
|
-
@include typography($theme-config);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
14
|
}
|
package/lib/style/_theming.scss
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
@forward '@angular/material' show
|
|
2
|
-
|
|
3
|
-
@forward 'node_modules/@angular/material/core/theming/theming' show private-is-theme-object, private-check-duplicate-theme-styles, $theme-ignore-duplication-warnings;
|
|
4
|
-
|
|
5
|
-
@forward 'node_modules/@angular/material/core/typography/typography-utils';
|
|
1
|
+
@forward '@angular/material' show elevation;
|
|
6
2
|
|
|
7
3
|
@forward './config';
|
|
8
4
|
@forward './variables';
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-firebase",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.5.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "
|
|
6
|
-
"@angular/core": "
|
|
5
|
+
"@angular/common": "21.2.3",
|
|
6
|
+
"@angular/core": "21.2.3",
|
|
7
7
|
"@angular/fire": "21.0.0-rc.0-canary.ac3dd7c",
|
|
8
|
-
"@angular/material": "
|
|
9
|
-
"@dereekb/date": "13.
|
|
10
|
-
"@dereekb/dbx-analytics": "13.
|
|
11
|
-
"@dereekb/dbx-core": "13.
|
|
12
|
-
"@dereekb/dbx-form": "13.
|
|
13
|
-
"@dereekb/dbx-web": "13.
|
|
14
|
-
"@dereekb/firebase": "13.
|
|
15
|
-
"@dereekb/model": "13.
|
|
16
|
-
"@dereekb/rxjs": "13.
|
|
17
|
-
"@dereekb/util": "13.
|
|
8
|
+
"@angular/material": "21.2.3",
|
|
9
|
+
"@dereekb/date": "13.5.0",
|
|
10
|
+
"@dereekb/dbx-analytics": "13.5.0",
|
|
11
|
+
"@dereekb/dbx-core": "13.5.0",
|
|
12
|
+
"@dereekb/dbx-form": "13.5.0",
|
|
13
|
+
"@dereekb/dbx-web": "13.5.0",
|
|
14
|
+
"@dereekb/firebase": "13.5.0",
|
|
15
|
+
"@dereekb/model": "13.5.0",
|
|
16
|
+
"@dereekb/rxjs": "13.5.0",
|
|
17
|
+
"@dereekb/util": "13.5.0",
|
|
18
18
|
"@ngrx/component-store": "^21.0.0",
|
|
19
19
|
"@ngx-formly/core": "git+https://git@github.com/dereekb/ngx-formly#996d1041c8d2afbe429985a5ad394e59327bfa1d",
|
|
20
20
|
"firebase": "^12.0.0",
|
|
@@ -240,19 +240,55 @@ interface OidcEntryClientFormFieldsConfig {
|
|
|
240
240
|
* Creates fields for the OAuth client create form.
|
|
241
241
|
*
|
|
242
242
|
* Includes `token_endpoint_auth_method` which is immutable after creation.
|
|
243
|
+
*
|
|
244
|
+
* @param config - Optional configuration for field generation, including mode and allowed auth methods.
|
|
245
|
+
* @returns Array of FormlyFieldConfig for the client creation form.
|
|
243
246
|
*/
|
|
244
247
|
declare function oidcEntryClientFormFields(config?: OidcEntryClientFormFieldsConfig): FormlyFieldConfig[];
|
|
248
|
+
/**
|
|
249
|
+
* Creates a value selection field for choosing the token endpoint authentication method.
|
|
250
|
+
*
|
|
251
|
+
* @param config - Optional configuration to filter the available auth method options.
|
|
252
|
+
* @returns A FormlyFieldConfig for the token endpoint auth method selector.
|
|
253
|
+
*/
|
|
245
254
|
declare function oidcClientTokenEndpointAuthMethodField(config?: OidcEntryClientFormFieldsConfig): FormlyFieldConfig;
|
|
246
255
|
/**
|
|
247
256
|
* Creates fields for updating an existing OAuth client.
|
|
248
257
|
*
|
|
249
258
|
* Excludes `token_endpoint_auth_method` (immutable after creation).
|
|
259
|
+
*
|
|
260
|
+
* @returns Array of FormlyFieldConfig for the client update form.
|
|
250
261
|
*/
|
|
251
262
|
declare function oidcEntryClientUpdateFormFields(): FormlyFieldConfig[];
|
|
263
|
+
/**
|
|
264
|
+
* Creates a text field for the OAuth client display name.
|
|
265
|
+
*
|
|
266
|
+
* @returns A FormlyFieldConfig for the client name input.
|
|
267
|
+
*/
|
|
252
268
|
declare function oidcClientNameField(): FormlyFieldConfig;
|
|
269
|
+
/**
|
|
270
|
+
* Creates a searchable chip field for entering redirect URIs.
|
|
271
|
+
*
|
|
272
|
+
* @returns A FormlyFieldConfig for the redirect URIs input.
|
|
273
|
+
*/
|
|
253
274
|
declare function oidcClientRedirectUrisField(): FormlyFieldConfig;
|
|
275
|
+
/**
|
|
276
|
+
* Creates a text field for the client's JWKS URI. Only visible when using private_key_jwt authentication.
|
|
277
|
+
*
|
|
278
|
+
* @returns A FormlyFieldConfig for the JWKS URI input.
|
|
279
|
+
*/
|
|
254
280
|
declare function oidcClientJwksUriField(): FormlyFieldConfig;
|
|
281
|
+
/**
|
|
282
|
+
* Creates a text field for the optional client logo URL.
|
|
283
|
+
*
|
|
284
|
+
* @returns A FormlyFieldConfig for the logo URI input.
|
|
285
|
+
*/
|
|
255
286
|
declare function oidcClientLogoUriField(): FormlyFieldConfig;
|
|
287
|
+
/**
|
|
288
|
+
* Creates a text field for the optional client homepage URL.
|
|
289
|
+
*
|
|
290
|
+
* @returns A FormlyFieldConfig for the homepage URL input.
|
|
291
|
+
*/
|
|
256
292
|
declare function oidcClientHomepageUriField(): FormlyFieldConfig;
|
|
257
293
|
interface OidcEntryClientTestFormFieldsConfig {
|
|
258
294
|
readonly redirectUris: OidcRedirectUri[];
|
|
@@ -260,10 +296,30 @@ interface OidcEntryClientTestFormFieldsConfig {
|
|
|
260
296
|
}
|
|
261
297
|
/**
|
|
262
298
|
* Assembles the form fields for the OAuth test client form.
|
|
299
|
+
*
|
|
300
|
+
* @param config - Configuration providing available redirect URIs and scopes for the test form.
|
|
301
|
+
* @returns Array of FormlyFieldConfig for the test client form.
|
|
263
302
|
*/
|
|
264
303
|
declare function oidcEntryClientTestFormFields(config: OidcEntryClientTestFormFieldsConfig): FormlyFieldConfig[];
|
|
304
|
+
/**
|
|
305
|
+
* Creates a read-only text field displaying the OAuth client ID.
|
|
306
|
+
*
|
|
307
|
+
* @returns A FormlyFieldConfig for the client ID display.
|
|
308
|
+
*/
|
|
265
309
|
declare function oidcClientTestClientIdField(): FormlyFieldConfig;
|
|
310
|
+
/**
|
|
311
|
+
* Creates a selection field for choosing one of the client's registered redirect URIs for testing.
|
|
312
|
+
*
|
|
313
|
+
* @param redirectUris - The registered redirect URIs to display as options.
|
|
314
|
+
* @returns A FormlyFieldConfig for the redirect URI selector.
|
|
315
|
+
*/
|
|
266
316
|
declare function oidcClientTestRedirectUriField(redirectUris: OidcRedirectUri[]): FormlyFieldConfig;
|
|
317
|
+
/**
|
|
318
|
+
* Creates a pickable chip field for selecting scopes to request during the test flow.
|
|
319
|
+
*
|
|
320
|
+
* @param availableScopes - The available scopes to display as selectable options.
|
|
321
|
+
* @returns A FormlyFieldConfig for the scopes selector.
|
|
322
|
+
*/
|
|
267
323
|
declare function oidcClientTestScopesField(availableScopes: OidcScopeDetails[]): FormlyFieldConfig;
|
|
268
324
|
|
|
269
325
|
type DbxFirebaseOidcModelClientFormValue = CreateOidcClientParams;
|
|
@@ -339,7 +395,9 @@ declare class DbxFirebaseOidcEntryClientListViewItemComponent extends AbstractDb
|
|
|
339
395
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOidcEntryClientListViewItemComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
340
396
|
}
|
|
341
397
|
|
|
342
|
-
/**
|
|
398
|
+
/**
|
|
399
|
+
* Document store for a single {@link OidcEntry}.
|
|
400
|
+
*/
|
|
343
401
|
declare class OidcEntryDocumentStore extends AbstractDbxFirebaseDocumentStore<OidcEntry, OidcEntryDocument> {
|
|
344
402
|
readonly oidcModelFunctions: OidcModelFunctions;
|
|
345
403
|
private readonly _latestClientSecret$;
|
|
@@ -384,9 +442,13 @@ declare class DbxFirebaseOidcEntryClientCreateComponent {
|
|
|
384
442
|
declare class DbxFirebaseOidcEntryClientTestComponent {
|
|
385
443
|
private readonly oidcEntryDocumentStore;
|
|
386
444
|
private readonly oidcConfigService;
|
|
387
|
-
/**
|
|
445
|
+
/**
|
|
446
|
+
* Scopes the user can pick from. Overrides the service default when provided.
|
|
447
|
+
*/
|
|
388
448
|
readonly availableScopes: _angular_core.InputSignal<Maybe<OidcScopeDetails[]>>;
|
|
389
|
-
/**
|
|
449
|
+
/**
|
|
450
|
+
* Path to the authorization endpoint. Overrides the service default when provided.
|
|
451
|
+
*/
|
|
390
452
|
readonly oidcAuthorizationEndpointApiPath: _angular_core.InputSignal<Maybe<string>>;
|
|
391
453
|
readonly resolvedAvailableScopes: _angular_core.Signal<OidcScopeDetails[]>;
|
|
392
454
|
readonly resolvedAuthorizationEndpointPath: _angular_core.Signal<string>;
|
|
@@ -398,7 +460,9 @@ declare class DbxFirebaseOidcEntryClientTestComponent {
|
|
|
398
460
|
readonly codeChallenge: _angular_core.WritableSignal<string>;
|
|
399
461
|
readonly state: _angular_core.WritableSignal<string>;
|
|
400
462
|
readonly nonce: _angular_core.WritableSignal<string>;
|
|
401
|
-
/**
|
|
463
|
+
/**
|
|
464
|
+
* The current form value, updated by the form via dbxFormValueChange.
|
|
465
|
+
*/
|
|
402
466
|
readonly formValue: _angular_core.WritableSignal<Maybe<DbxFirebaseOidcModelClientTestFormValue>>;
|
|
403
467
|
readonly authorizationUrlSignal: _angular_core.Signal<string | undefined>;
|
|
404
468
|
constructor();
|
|
@@ -440,21 +504,27 @@ declare class DbxFirebaseOidcEntryClientViewComponent {
|
|
|
440
504
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DbxFirebaseOidcEntryClientViewComponent, "dbx-firebase-oidc-entry-client-view", never, {}, {}, never, never, true, never>;
|
|
441
505
|
}
|
|
442
506
|
|
|
443
|
-
/**
|
|
507
|
+
/**
|
|
508
|
+
* Collection store for querying {@link OidcEntry} documents.
|
|
509
|
+
*/
|
|
444
510
|
declare class OidcEntryCollectionStore extends AbstractDbxFirebaseCollectionStore<OidcEntry, OidcEntryDocument> {
|
|
445
511
|
constructor();
|
|
446
512
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OidcEntryCollectionStore, never>;
|
|
447
513
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<OidcEntryCollectionStore>;
|
|
448
514
|
}
|
|
449
515
|
|
|
450
|
-
/**
|
|
516
|
+
/**
|
|
517
|
+
* Directive providing a {@link OidcEntryCollectionStore} for querying {@link OidcEntry} documents.
|
|
518
|
+
*/
|
|
451
519
|
declare class OidcEntryCollectionStoreDirective extends DbxFirebaseCollectionStoreDirective<OidcEntry, OidcEntryDocument, OidcEntryCollectionStore> {
|
|
452
520
|
constructor();
|
|
453
521
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OidcEntryCollectionStoreDirective, never>;
|
|
454
522
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<OidcEntryCollectionStoreDirective, "[dbxOidcEntryCollection]", never, {}, {}, never, never, true, never>;
|
|
455
523
|
}
|
|
456
524
|
|
|
457
|
-
/**
|
|
525
|
+
/**
|
|
526
|
+
* Directive providing a {@link OidcEntryDocumentStore} for accessing a single {@link OidcEntry} document.
|
|
527
|
+
*/
|
|
458
528
|
declare class OidcEntryDocumentStoreDirective extends DbxFirebaseDocumentStoreDirective<OidcEntry, OidcEntryDocument, OidcEntryDocumentStore> {
|
|
459
529
|
constructor();
|
|
460
530
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<OidcEntryDocumentStoreDirective, never>;
|
|
@@ -490,11 +560,17 @@ declare const DEFAULT_OIDC_TOKEN_ENDPOINT_AUTH_METHODS: OidcTokenEndpointAuthMet
|
|
|
490
560
|
* Apps provide a concrete implementation via `provideDbxFirebaseOidc()`.
|
|
491
561
|
*/
|
|
492
562
|
declare abstract class DbxFirebaseOidcConfig {
|
|
493
|
-
/**
|
|
563
|
+
/**
|
|
564
|
+
* Available scopes for the OIDC provider. Used in scope picker fields.
|
|
565
|
+
*/
|
|
494
566
|
abstract readonly availableScopes: OidcScopeDetails[];
|
|
495
|
-
/**
|
|
567
|
+
/**
|
|
568
|
+
* Path to the authorization endpoint. Defaults to '/oidc/auth'.
|
|
569
|
+
*/
|
|
496
570
|
readonly oidcAuthorizationEndpointApiPath?: Maybe<string>;
|
|
497
|
-
/**
|
|
571
|
+
/**
|
|
572
|
+
* Base path for interaction endpoints. Defaults to '/interaction'.
|
|
573
|
+
*/
|
|
498
574
|
readonly oidcInteractionEndpointApiPath?: Maybe<string>;
|
|
499
575
|
/**
|
|
500
576
|
* Supported token endpoint authentication methods.
|
|
@@ -541,6 +617,9 @@ declare class DbxFirebaseOidcConfigService {
|
|
|
541
617
|
|
|
542
618
|
/**
|
|
543
619
|
* Provider factory for the {@link OidcModelFirestoreCollections}.
|
|
620
|
+
*
|
|
621
|
+
* @param appCollection - The application's Firestore collection that must implement {@link OidcModelFirestoreCollections}.
|
|
622
|
+
* @returns The validated OidcModelFirestoreCollections instance.
|
|
544
623
|
*/
|
|
545
624
|
declare function provideOidcModelFirestoreCollections(appCollection: OidcModelFirestoreCollections): OidcModelFirestoreCollections;
|
|
546
625
|
/**
|
|
@@ -572,6 +651,9 @@ interface ProvideDbxFirebaseOidcConfig {
|
|
|
572
651
|
* When `oauthInteractionRoute` is configured in {@link DbxFirebaseOidcConfig}, an app initializer
|
|
573
652
|
* is registered that adds that route to the {@link DbxAppAuthRouterService} ignored routes set,
|
|
574
653
|
* preventing auth effects from redirecting away during the OIDC interaction flow.
|
|
654
|
+
*
|
|
655
|
+
* @param config - Configuration specifying the app collection class, OIDC settings, and provider options.
|
|
656
|
+
* @returns EnvironmentProviders for the OIDC module.
|
|
575
657
|
*/
|
|
576
658
|
declare function provideDbxFirebaseOidc(config: ProvideDbxFirebaseOidcConfig): EnvironmentProviders;
|
|
577
659
|
|
|
@@ -590,6 +672,8 @@ declare class DbxFirebaseOidcInteractionService {
|
|
|
590
672
|
private readonly _oidcConfig;
|
|
591
673
|
/**
|
|
592
674
|
* Base URL for the interaction API, derived from the OIDC config service.
|
|
675
|
+
*
|
|
676
|
+
* @returns The base URL string for the OIDC interaction endpoint.
|
|
593
677
|
*/
|
|
594
678
|
get baseUrl(): string;
|
|
595
679
|
/**
|
|
@@ -597,6 +681,7 @@ declare class DbxFirebaseOidcInteractionService {
|
|
|
597
681
|
*
|
|
598
682
|
* Automatically attaches the current user's Firebase ID token.
|
|
599
683
|
*
|
|
684
|
+
* @param uid - The OIDC interaction UID identifying the current login interaction.
|
|
600
685
|
* @returns Observable that emits the redirect URL from the server response.
|
|
601
686
|
*/
|
|
602
687
|
submitLogin(uid: OidcInteractionUid): Observable<OAuthInteractionLoginResponse>;
|
|
@@ -605,6 +690,8 @@ declare class DbxFirebaseOidcInteractionService {
|
|
|
605
690
|
*
|
|
606
691
|
* Automatically attaches the current user's Firebase ID token.
|
|
607
692
|
*
|
|
693
|
+
* @param uid - The OIDC interaction UID identifying the current consent interaction.
|
|
694
|
+
* @param approved - Whether the user approved or denied the consent request.
|
|
608
695
|
* @returns Observable that emits the redirect URL from the server response.
|
|
609
696
|
*/
|
|
610
697
|
submitConsent(uid: OidcInteractionUid, approved: boolean): Observable<OAuthInteractionConsentResponse>;
|