@dereekb/firebase-server 13.36.0 → 13.38.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.
Files changed (45) hide show
  1. package/calcom/package.json +10 -10
  2. package/discord/package.json +10 -10
  3. package/index.cjs.js +1732 -510
  4. package/index.esm.js +1717 -513
  5. package/mailgun/package.json +9 -9
  6. package/mcp/index.cjs.js +913 -167
  7. package/mcp/index.esm.js +906 -166
  8. package/mcp/package.json +13 -12
  9. package/mcp/src/lib/controller/mcp.controller.d.ts +28 -3
  10. package/mcp/src/lib/controller/mcp.wellknown.controller.d.ts +21 -1
  11. package/mcp/src/lib/mcp.config.d.ts +31 -8
  12. package/mcp/src/lib/mcp.module.d.ts +2 -1
  13. package/mcp/src/lib/service/index.d.ts +1 -0
  14. package/mcp/src/lib/service/mcp.server.factory.d.ts +8 -6
  15. package/mcp/src/lib/service/mcp.tool-generator.d.ts +1 -1
  16. package/mcp/src/lib/service/mcp.visibility.d.ts +1 -1
  17. package/mcp/src/lib/service/tools/mcp.tool.model-roles.d.ts +95 -0
  18. package/mcp/src/lib/transport/streamable-http.transport.d.ts +16 -11
  19. package/model/index.cjs.js +1 -1
  20. package/model/index.esm.js +1 -1
  21. package/model/package.json +9 -9
  22. package/oidc/index.cjs.js +257 -67
  23. package/oidc/index.esm.js +256 -69
  24. package/oidc/package.json +10 -10
  25. package/oidc/src/lib/profile.d.ts +21 -0
  26. package/oidc/src/lib/service/index.d.ts +1 -0
  27. package/oidc/src/lib/service/oidc.config.service.d.ts +14 -0
  28. package/oidc/src/lib/service/oidc.interaction-policy.d.ts +35 -0
  29. package/oidc/src/lib/service/oidc.service.d.ts +29 -0
  30. package/package.json +14 -13
  31. package/src/lib/env/env.service.d.ts +27 -3
  32. package/src/lib/nest/controller/api.scope.d.ts +63 -0
  33. package/src/lib/nest/controller/index.d.ts +2 -0
  34. package/src/lib/nest/controller/model/model.api.get.service.d.ts +146 -1
  35. package/src/lib/nest/controller/model/model.api.scope.d.ts +3 -2
  36. package/src/lib/nest/controller/session/index.d.ts +4 -0
  37. package/src/lib/nest/controller/session/session.api.config.d.ts +104 -0
  38. package/src/lib/nest/controller/session/session.api.controller.d.ts +26 -0
  39. package/src/lib/nest/controller/session/session.api.module.d.ts +49 -0
  40. package/src/lib/nest/controller/session/session.api.service.d.ts +71 -0
  41. package/test/index.cjs.js +8 -8
  42. package/test/index.esm.js +8 -8
  43. package/test/package.json +11 -11
  44. package/twilio/package.json +8 -8
  45. package/zoho/package.json +10 -10
package/oidc/index.esm.js CHANGED
@@ -3,7 +3,7 @@ import { errors } from 'oidc-provider';
3
3
  import { SECONDS_IN_MINUTE, SECONDS_IN_DAY, cachedGetter, unixDateTimeSecondsNumberToDate, unixDateTimeSecondsNumberForNow, selectiveFieldEncryptor, filterUndefinedValues, websiteUrlFromPaths, firstValue, hasHttpPrefix } from '@dereekb/util';
4
4
  import { generateKeyPairSync, randomBytes } from 'node:crypto';
5
5
  import { resolveEncryptionKey, encryptValue, decryptValue, createAesStringEncryptionProvider, isValidAES256GCMEncryptionSecret } from '@dereekb/nestjs';
6
- import { where, iterateFirestoreDocumentSnapshotPairs, firestoreModelIdentity, snapshotConverterFunctions, optionalFirestoreDate, firestoreDate, firestoreEnum, firestorePassThroughField, AbstractFirestoreDocument, createOidcClientParamsType, deleteOidcClientParamsType, deleteOidcTokenParamsType, rotateOidcClientSecretParamsType, updateOidcClientParamsType, firestoreModelKey, oidcEntryIdentity, PUBLIC_PKCE_TOKEN_ENDPOINT_AUTH_METHOD, OIDC_ENTRY_CLIENT_TYPE, oidcEntriesByUserCodeQuery, oidcEntriesByUidQuery, oidcEntriesByGrantIdQuery, oidcProviderProfilesForClient, requiredScopesForOidcProviderProfiles, scopesForOidcProviderProfiles, oidcScopesFromScopeClaim, adminOnlyScopesForOidcProviderProfiles, oidcEntryFirestoreCollection } from '@dereekb/firebase';
6
+ import { where, iterateFirestoreDocumentSnapshotPairs, firestoreModelIdentity, snapshotConverterFunctions, optionalFirestoreDate, firestoreDate, firestoreEnum, firestorePassThroughField, AbstractFirestoreDocument, createOidcClientParamsType, deleteOidcClientParamsType, deleteOidcTokenParamsType, rotateOidcClientSecretParamsType, updateOidcClientParamsType, firestoreModelKey, oidcEntryIdentity, PUBLIC_PKCE_TOKEN_ENDPOINT_AUTH_METHOD, OIDC_ENTRY_CLIENT_TYPE, oidcEntriesByUserCodeQuery, oidcEntriesByUidQuery, oidcEntriesByGrantIdQuery, assignmentOnlyScopesForOidcProviderProfiles, adminOnlyScopesForOidcProviderProfiles, oidcProviderProfilesForClient, requiredScopesForOidcProviderProfiles, scopesForOidcProviderProfiles, oidcScopesFromScopeClaim, oidcEntryFirestoreCollection } from '@dereekb/firebase';
7
7
  import { firestoreEncryptedField, firebaseServerActionsContext, FirebaseServerEnvService, FirebaseServerAnalyticsService, FIREBASE_FIRESTORE_CONTEXT_TOKEN, FirebaseServerFirestoreContextModule } from '@dereekb/firebase-server';
8
8
  import { nanoid } from 'nanoid';
9
9
  import { safeToJsDate } from '@dereekb/date';
@@ -2817,7 +2817,7 @@ function _define_property$b(obj, key, value) {
2817
2817
  }
2818
2818
  return obj;
2819
2819
  }
2820
- function _instanceof$2(left, right) {
2820
+ function _instanceof$3(left, right) {
2821
2821
  "@swc/helpers - instanceof";
2822
2822
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
2823
2823
  return !!right[Symbol.hasInstance](left);
@@ -2986,7 +2986,7 @@ var GRANTABLE_MODELS = new Set(GRANTABLE_MODEL_NAMES);
2986
2986
  case 0:
2987
2987
  // Set ownership key for Client entries so firestore rules can restrict reads by owner.
2988
2988
  // The firestoreOwnerKey is passed through the payload metadata by OidcClientService.
2989
- o = this.name === OIDC_ENTRY_CLIENT_TYPE ? payload.firestoreOwnerKey : undefined;
2989
+ o = this.name === OIDC_ENTRY_CLIENT_TYPE ? payload['firestoreOwnerKey'] : undefined;
2990
2990
  // oidc-provider uses `accountId` as the user identifier on Grant, AccessToken,
2991
2991
  // RefreshToken, etc. — `payload.uid` is only populated on Session/Interaction.
2992
2992
  // Fall back to `accountId` so the indexed `uid` column works for all entry types.
@@ -3000,7 +3000,7 @@ var GRANTABLE_MODELS = new Set(GRANTABLE_MODEL_NAMES);
3000
3000
  // inherit `iat` (epoch seconds) from BaseToken; Client entries use
3001
3001
  // `created_at` (ISO string).
3002
3002
  iat = payload.iat;
3003
- createdAtIso = payload.created_at;
3003
+ createdAtIso = payload['created_at'];
3004
3004
  if (typeof iat === 'number') {
3005
3005
  createdAt = unixDateTimeSecondsNumberToDate(iat);
3006
3006
  } else if (createdAtIso) {
@@ -3228,7 +3228,7 @@ var GRANTABLE_MODELS = new Set(GRANTABLE_MODEL_NAMES);
3228
3228
  value: function _toPayload(data) {
3229
3229
  var expiresDate;
3230
3230
  if (data.expiresAt) {
3231
- expiresDate = _instanceof$2(data.expiresAt, Date) ? data.expiresAt : data.expiresAt.toDate();
3231
+ expiresDate = _instanceof$3(data.expiresAt, Date) ? data.expiresAt : data.expiresAt.toDate();
3232
3232
  }
3233
3233
  var isExpired = expiresDate != null && expiresDate < new Date();
3234
3234
  return isExpired ? undefined : encryptionService.decryptAdapterPayload(data.payload);
@@ -3240,13 +3240,13 @@ var GRANTABLE_MODELS = new Set(GRANTABLE_MODEL_NAMES);
3240
3240
  return FirestoreAdapter;
3241
3241
  }
3242
3242
 
3243
- function _array_like_to_array$6(arr, len) {
3243
+ function _array_like_to_array$7(arr, len) {
3244
3244
  if (len == null || len > arr.length) len = arr.length;
3245
3245
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3246
3246
  return arr2;
3247
3247
  }
3248
- function _array_without_holes$6(arr) {
3249
- if (Array.isArray(arr)) return _array_like_to_array$6(arr);
3248
+ function _array_without_holes$7(arr) {
3249
+ if (Array.isArray(arr)) return _array_like_to_array$7(arr);
3250
3250
  }
3251
3251
  function _class_call_check$a(instance, Constructor) {
3252
3252
  if (!(instance instanceof Constructor)) {
@@ -3279,22 +3279,22 @@ function _define_property$a(obj, key, value) {
3279
3279
  }
3280
3280
  return obj;
3281
3281
  }
3282
- function _iterable_to_array$6(iter) {
3282
+ function _iterable_to_array$7(iter) {
3283
3283
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
3284
3284
  }
3285
- function _non_iterable_spread$6() {
3285
+ function _non_iterable_spread$7() {
3286
3286
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3287
3287
  }
3288
- function _to_consumable_array$6(arr) {
3289
- return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$6();
3288
+ function _to_consumable_array$7(arr) {
3289
+ return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$7();
3290
3290
  }
3291
- function _unsupported_iterable_to_array$6(o, minLen) {
3291
+ function _unsupported_iterable_to_array$7(o, minLen) {
3292
3292
  if (!o) return;
3293
- if (typeof o === "string") return _array_like_to_array$6(o, minLen);
3293
+ if (typeof o === "string") return _array_like_to_array$7(o, minLen);
3294
3294
  var n = Object.prototype.toString.call(o).slice(8, -1);
3295
3295
  if (n === "Object" && o.constructor) n = o.constructor.name;
3296
3296
  if (n === "Map" || n === "Set") return Array.from(n);
3297
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
3297
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
3298
3298
  }
3299
3299
  // MARK: Encrypted Fields
3300
3300
  /**
@@ -3322,7 +3322,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
3322
3322
  this.provider = createAesStringEncryptionProvider(config.jwksKeyConverterConfig.encryptionSecret);
3323
3323
  this.adapterPayloadEncryptor = selectiveFieldEncryptor({
3324
3324
  provider: this.provider,
3325
- fields: _to_consumable_array$6(OIDC_ENCRYPTED_PAYLOAD_FIELDS)
3325
+ fields: _to_consumable_array$7(OIDC_ENCRYPTED_PAYLOAD_FIELDS)
3326
3326
  });
3327
3327
  }
3328
3328
  _create_class$8(OidcEncryptionService, [
@@ -3358,13 +3358,13 @@ OidcEncryptionService = __decorate([
3358
3358
  __param(0, Inject(OidcModuleConfig))
3359
3359
  ], OidcEncryptionService);
3360
3360
 
3361
- function _array_like_to_array$5(arr, len) {
3361
+ function _array_like_to_array$6(arr, len) {
3362
3362
  if (len == null || len > arr.length) len = arr.length;
3363
3363
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3364
3364
  return arr2;
3365
3365
  }
3366
- function _array_without_holes$5(arr) {
3367
- if (Array.isArray(arr)) return _array_like_to_array$5(arr);
3366
+ function _array_without_holes$6(arr) {
3367
+ if (Array.isArray(arr)) return _array_like_to_array$6(arr);
3368
3368
  }
3369
3369
  function _class_call_check$9(instance, Constructor) {
3370
3370
  if (!(instance instanceof Constructor)) {
@@ -3397,22 +3397,22 @@ function _define_property$9(obj, key, value) {
3397
3397
  }
3398
3398
  return obj;
3399
3399
  }
3400
- function _iterable_to_array$5(iter) {
3400
+ function _iterable_to_array$6(iter) {
3401
3401
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
3402
3402
  }
3403
- function _non_iterable_spread$5() {
3403
+ function _non_iterable_spread$6() {
3404
3404
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3405
3405
  }
3406
- function _to_consumable_array$5(arr) {
3407
- return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$5();
3406
+ function _to_consumable_array$6(arr) {
3407
+ return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$6();
3408
3408
  }
3409
- function _unsupported_iterable_to_array$5(o, minLen) {
3409
+ function _unsupported_iterable_to_array$6(o, minLen) {
3410
3410
  if (!o) return;
3411
- if (typeof o === "string") return _array_like_to_array$5(o, minLen);
3411
+ if (typeof o === "string") return _array_like_to_array$6(o, minLen);
3412
3412
  var n = Object.prototype.toString.call(o).slice(8, -1);
3413
3413
  if (n === "Object" && o.constructor) n = o.constructor.name;
3414
3414
  if (n === "Map" || n === "Set") return Array.from(n);
3415
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
3415
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
3416
3416
  }
3417
3417
  // MARK: Routes
3418
3418
  /**
@@ -3461,7 +3461,7 @@ var DEFAULT_OIDC_CODE_CHALLENGE_METHODS = [
3461
3461
  */ var OidcProviderConfigService = /*#__PURE__*/ function() {
3462
3462
  function OidcProviderConfigService(config, accountService, envService) {
3463
3463
  _class_call_check$9(this, OidcProviderConfigService);
3464
- var _this_config_tokenEndpointAuthMethods;
3464
+ var _this_providerConfig_providerProfiles, _this_config_tokenEndpointAuthMethods;
3465
3465
  _define_property$9(this, "config", void 0);
3466
3466
  _define_property$9(this, "routes", DEFAULT_OIDC_ROUTES);
3467
3467
  /**
@@ -3480,6 +3480,19 @@ var DEFAULT_OIDC_CODE_CHALLENGE_METHODS = [
3480
3480
  * Scopes derived from the claims configuration keys.
3481
3481
  */ _define_property$9(this, "scopesSupported", void 0);
3482
3482
  /**
3483
+ * {@link scopesSupported} minus the scopes only an admin-assigned {@link OidcProviderProfile}
3484
+ * unlocks — what an arbitrary client (a dynamically registered one included) may actually put in
3485
+ * an authorization request.
3486
+ *
3487
+ * The issuer's own discovery document keeps advertising the full {@link scopesSupported}: the
3488
+ * provider does support those scopes, for the clients holding the profile. This narrower list is
3489
+ * for metadata a client treats as a request template — notably an MCP protected-resource
3490
+ * document's `scopes_supported`, which dynamic-registration clients (the Claude Code CLI) copy
3491
+ * verbatim onto `/authorize`. An assignment-only scope advertised there ends the flow in
3492
+ * `access_denied`: the consent unlock gate judges the REQUEST, so unlike an admin-only scope
3493
+ * there is no deselect-at-consent way through.
3494
+ */ _define_property$9(this, "clientRequestableScopesSupported", void 0);
3495
+ /**
3483
3496
  * Flat list of all unique claim names from the claims configuration.
3484
3497
  */ _define_property$9(this, "claimsSupported", void 0);
3485
3498
  /**
@@ -3488,8 +3501,12 @@ var DEFAULT_OIDC_CODE_CHALLENGE_METHODS = [
3488
3501
  this.config = config;
3489
3502
  this.providerConfig = accountService.providerConfig;
3490
3503
  this.scopesSupported = Object.keys(this.providerConfig.claims);
3504
+ var assignmentOnlyScopes = assignmentOnlyScopesForOidcProviderProfiles((_this_providerConfig_providerProfiles = this.providerConfig.providerProfiles) !== null && _this_providerConfig_providerProfiles !== void 0 ? _this_providerConfig_providerProfiles : []);
3505
+ this.clientRequestableScopesSupported = this.scopesSupported.filter(function(scope) {
3506
+ return !assignmentOnlyScopes.has(scope);
3507
+ });
3491
3508
  this.claimsSupported = Array.from(new Set(Object.values(this.providerConfig.claims).flat()));
3492
- this.tokenEndpointAuthMethodsSupported = (_this_config_tokenEndpointAuthMethods = this.config.tokenEndpointAuthMethods) !== null && _this_config_tokenEndpointAuthMethods !== void 0 ? _this_config_tokenEndpointAuthMethods : _to_consumable_array$5(DEFAULT_OIDC_TOKEN_ENDPOINT_AUTH_METHODS);
3509
+ this.tokenEndpointAuthMethodsSupported = (_this_config_tokenEndpointAuthMethods = this.config.tokenEndpointAuthMethods) !== null && _this_config_tokenEndpointAuthMethods !== void 0 ? _this_config_tokenEndpointAuthMethods : _to_consumable_array$6(DEFAULT_OIDC_TOKEN_ENDPOINT_AUTH_METHODS);
3493
3510
  var appUrl = envService.appUrl;
3494
3511
  this.appLoginUrl = websiteUrlFromPaths(appUrl, [
3495
3512
  this.config.appOAuthInteractionPath,
@@ -3522,16 +3539,16 @@ var DEFAULT_OIDC_CODE_CHALLENGE_METHODS = [
3522
3539
  jwks_uri: jwksUri !== null && jwksUri !== void 0 ? jwksUri : "".concat(issuer).concat(routes.jwks),
3523
3540
  registration_endpoint: this.oidcRegistrationRouteEnabled ? "".concat(issuer).concat(routes.registration) : undefined,
3524
3541
  scopes_supported: this.scopesSupported,
3525
- response_types_supported: _to_consumable_array$5(providerConfig.responseTypes),
3542
+ response_types_supported: _to_consumable_array$6(providerConfig.responseTypes),
3526
3543
  response_modes_supported: [
3527
3544
  'query'
3528
3545
  ],
3529
- grant_types_supported: _to_consumable_array$5(providerConfig.grantTypes),
3530
- subject_types_supported: _to_consumable_array$5(DEFAULT_OIDC_SUBJECT_TYPES),
3531
- id_token_signing_alg_values_supported: _to_consumable_array$5(DEFAULT_OIDC_ID_TOKEN_SIGNING_ALG_VALUES),
3532
- token_endpoint_auth_methods_supported: _to_consumable_array$5(this.tokenEndpointAuthMethodsSupported),
3546
+ grant_types_supported: _to_consumable_array$6(providerConfig.grantTypes),
3547
+ subject_types_supported: _to_consumable_array$6(DEFAULT_OIDC_SUBJECT_TYPES),
3548
+ id_token_signing_alg_values_supported: _to_consumable_array$6(DEFAULT_OIDC_ID_TOKEN_SIGNING_ALG_VALUES),
3549
+ token_endpoint_auth_methods_supported: _to_consumable_array$6(this.tokenEndpointAuthMethodsSupported),
3533
3550
  claims_supported: this.claimsSupported,
3534
- code_challenge_methods_supported: _to_consumable_array$5(DEFAULT_OIDC_CODE_CHALLENGE_METHODS)
3551
+ code_challenge_methods_supported: _to_consumable_array$6(DEFAULT_OIDC_CODE_CHALLENGE_METHODS)
3535
3552
  };
3536
3553
  }
3537
3554
  }
@@ -3545,6 +3562,31 @@ OidcProviderConfigService = __decorate([
3545
3562
  __param(2, Inject(FirebaseServerEnvService))
3546
3563
  ], OidcProviderConfigService);
3547
3564
 
3565
+ function _array_like_to_array$5(arr, len) {
3566
+ if (len == null || len > arr.length) len = arr.length;
3567
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3568
+ return arr2;
3569
+ }
3570
+ function _array_without_holes$5(arr) {
3571
+ if (Array.isArray(arr)) return _array_like_to_array$5(arr);
3572
+ }
3573
+ function _iterable_to_array$5(iter) {
3574
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
3575
+ }
3576
+ function _non_iterable_spread$5() {
3577
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3578
+ }
3579
+ function _to_consumable_array$5(arr) {
3580
+ return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$5();
3581
+ }
3582
+ function _unsupported_iterable_to_array$5(o, minLen) {
3583
+ if (!o) return;
3584
+ if (typeof o === "string") return _array_like_to_array$5(o, minLen);
3585
+ var n = Object.prototype.toString.call(o).slice(8, -1);
3586
+ if (n === "Object" && o.constructor) n = o.constructor.name;
3587
+ if (n === "Map" || n === "Set") return Array.from(n);
3588
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
3589
+ }
3548
3590
  /**
3549
3591
  * Custom oidc-provider client metadata field holding the {@link OidcProviderProfile} keys assigned
3550
3592
  * to a client. Registered via `extraClientMetadata` and persisted on the client's `OidcEntry` payload.
@@ -3570,6 +3612,61 @@ OidcProviderConfigService = __decorate([
3570
3612
  required: requiredScopesForOidcProviderProfiles(clientProfiles)
3571
3613
  };
3572
3614
  }
3615
+ /**
3616
+ * Resolves every scope restricted to admin users: the provider config's own `adminOnlyScopes`
3617
+ * unioned with the scopes of each profile marked {@link OidcProviderProfile.adminOnly}.
3618
+ *
3619
+ * The single choke point for that union — the consent admin-only gate (which hard-rejects a
3620
+ * non-admin who consented to one) and the consent URL builder (which withholds them from a
3621
+ * non-admin's consent screen in the first place) both read through it, so the set a user is
3622
+ * offered and the set they are judged against cannot drift apart.
3623
+ *
3624
+ * @param providerConfig - The provider config supplying `adminOnlyScopes` and the profile registry.
3625
+ * @returns The union of config-level and profile-level admin-only scopes.
3626
+ */ function adminOnlyScopesForOidcProviderConfig(providerConfig) {
3627
+ var _providerConfig_adminOnlyScopes, _providerConfig_providerProfiles;
3628
+ return new Set(_to_consumable_array$5((_providerConfig_adminOnlyScopes = providerConfig.adminOnlyScopes) !== null && _providerConfig_adminOnlyScopes !== void 0 ? _providerConfig_adminOnlyScopes : []).concat(_to_consumable_array$5(adminOnlyScopesForOidcProviderProfiles((_providerConfig_providerProfiles = providerConfig.providerProfiles) !== null && _providerConfig_providerProfiles !== void 0 ? _providerConfig_providerProfiles : []))));
3629
+ }
3630
+
3631
+ /**
3632
+ * Reason string of the check {@link buildOidcInteractionPolicy} adds to the `login` prompt.
3633
+ */ var STALE_SESSION_ACCOUNT_CHECK_REASON = 'stale_session_account';
3634
+ /**
3635
+ * Builds the interaction policy: oidc-provider's default prompts, plus a `login` check that
3636
+ * catches a session whose account no longer resolves.
3637
+ *
3638
+ * The default policy crashes on that case. `login`'s `no_session` check passes on
3639
+ * `oidc.session.accountId` alone — the value in the `_session` cookie — while `loadAccount` puts
3640
+ * the result of `findAccount` on `oidc.account`, and `loadGrant` establishes `oidc.grant` ONLY when
3641
+ * that account resolved. So a cookie naming a deleted account skips the login prompt, reaches the
3642
+ * `consent` prompt's `op_scopes_missing` check, and dereferences `oidc.grant.getOIDCScopeEncountered()`
3643
+ * on `undefined` — a `TypeError` that oidc-provider renders as an opaque `server_error`, on every
3644
+ * authorization request, until the user clears the cookie by hand.
3645
+ *
3646
+ * Deleted accounts are ordinary: an emulator database reset in development, an account deletion in
3647
+ * production. Re-authenticating is the correct response, so this requests the `login` prompt and the
3648
+ * user recovers by logging in. The check is added to `login` rather than guarding `consent` so the
3649
+ * prompt loop short-circuits before any consent check runs (it breaks on the first prompt that
3650
+ * fires).
3651
+ *
3652
+ * @param policyNamespace - The `interactionPolicy` namespace from the runtime `oidc-provider` import.
3653
+ * @returns The default policy with the stale-session check installed on the `login` prompt.
3654
+ */ function buildOidcInteractionPolicy(policyNamespace) {
3655
+ var base = policyNamespace.base, Check = policyNamespace.Check;
3656
+ var policy = base();
3657
+ var loginPrompt = policy.get('login');
3658
+ if (loginPrompt) {
3659
+ var staleSessionAccountCheck = new Check(STALE_SESSION_ACCOUNT_CHECK_REASON, 'End-User authentication is required', 'login_required', function(ctx) {
3660
+ var _oidc_session;
3661
+ var oidc = ctx.oidc;
3662
+ return ((_oidc_session = oidc.session) === null || _oidc_session === void 0 ? void 0 : _oidc_session.accountId) && !oidc.account ? Check.REQUEST_PROMPT : Check.NO_NEED_TO_PROMPT;
3663
+ });
3664
+ // Placed after `login_prompt`/`no_session` (appended) — order within a prompt only affects which
3665
+ // reason is reported when several fire, and a stale account is the more specific diagnosis.
3666
+ loginPrompt.checks.add(staleSessionAccountCheck);
3667
+ }
3668
+ return policy;
3669
+ }
3573
3670
 
3574
3671
  function _array_like_to_array$4(arr, len) {
3575
3672
  if (len == null || len > arr.length) len = arr.length;
@@ -3639,6 +3736,14 @@ function _define_property$8(obj, key, value) {
3639
3736
  }
3640
3737
  return obj;
3641
3738
  }
3739
+ function _instanceof$2(left, right) {
3740
+ "@swc/helpers - instanceof";
3741
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
3742
+ return !!right[Symbol.hasInstance](left);
3743
+ } else {
3744
+ return left instanceof right;
3745
+ }
3746
+ }
3642
3747
  function _iterable_to_array$4(iter) {
3643
3748
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
3644
3749
  }
@@ -3825,11 +3930,12 @@ function _ts_generator$5(thisArg, body) {
3825
3930
  };
3826
3931
  }
3827
3932
  }
3933
+ var OidcService_1;
3828
3934
  // MARK: Service
3829
3935
  /**
3830
3936
  * Core OIDC service that wraps the oidc-provider instance and exposes
3831
3937
  * typed methods for interaction handling, provider initialization, and JWKS management.
3832
- */ var OidcService = /*#__PURE__*/ function() {
3938
+ */ var OidcService = OidcService_1 = /*#__PURE__*/ function() {
3833
3939
  function OidcService(config, providerConfigService, jwksService, accountService, collections, encryptionService) {
3834
3940
  var _this = this;
3835
3941
  _class_call_check$8(this, OidcService);
@@ -3839,6 +3945,7 @@ function _ts_generator$5(thisArg, body) {
3839
3945
  _define_property$8(this, "accountService", void 0);
3840
3946
  _define_property$8(this, "collections", void 0);
3841
3947
  _define_property$8(this, "encryptionService", void 0);
3948
+ _define_property$8(this, "_logger", new Logger(OidcService_1.name));
3842
3949
  _define_property$8(this, "_getProvider", cachedGetter(function() {
3843
3950
  return _this._buildProvider();
3844
3951
  }));
@@ -4237,11 +4344,11 @@ function _ts_generator$5(thisArg, body) {
4237
4344
  interactions: {
4238
4345
  url: function url(_ctx, interaction) {
4239
4346
  return _async_to_generator$5(function() {
4240
- var baseUrl, client_id, paramsToEncode, client, _client_dbx_provider_profiles, scopes, requestedScopeSet, required, requiredScopes, interactionLoginDetails, paramsString;
4347
+ var baseUrl, client_id, paramsToEncode, client, _client_dbx_provider_profiles, requestedScopes, isAdmin, adminOnlyScopes, offeredScopes, scopes, requestedScopeSet, required, requiredScopes, interactionLoginDetails, paramsString;
4241
4348
  return _ts_generator$5(this, function(_state) {
4242
4349
  switch(_state.label){
4243
4350
  case 0:
4244
- client_id = interaction.params.client_id;
4351
+ client_id = interaction.params['client_id'];
4245
4352
  paramsToEncode = {
4246
4353
  uid: interaction.uid,
4247
4354
  client_id: client_id
@@ -4253,7 +4360,7 @@ function _ts_generator$5(thisArg, body) {
4253
4360
  baseUrl = this.providerConfigService.appLoginUrl;
4254
4361
  return [
4255
4362
  3,
4256
- 3
4363
+ 4
4257
4364
  ];
4258
4365
  case 1:
4259
4366
  baseUrl = this.providerConfigService.appConsentUrl;
@@ -4263,29 +4370,42 @@ function _ts_generator$5(thisArg, body) {
4263
4370
  ];
4264
4371
  case 2:
4265
4372
  client = _state.sent();
4266
- if (client) {
4267
- scopes = interaction.params.scope;
4268
- // Surface the scopes the client's provider profiles force-require so the consent UI can
4269
- // render them as required. Intersect with the actually-requested scopes so only visible
4270
- // scope rows are flagged.
4271
- requestedScopeSet = new Set(scopes.split(' ').filter(Boolean));
4272
- required = oidcClientProviderProfileScopes(providerConfig.providerProfiles, (_client_dbx_provider_profiles = client.dbx_provider_profiles) !== null && _client_dbx_provider_profiles !== void 0 ? _client_dbx_provider_profiles : undefined).required;
4273
- requiredScopes = Array.from(required).filter(function(scope) {
4274
- return requestedScopeSet.has(scope);
4275
- });
4276
- interactionLoginDetails = _object_spread$3({
4277
- client_id: client_id,
4278
- client_name: client.client_name,
4279
- client_uri: client.client_uri,
4280
- logo_uri: client.logo_uri,
4281
- scopes: scopes
4282
- }, requiredScopes.length > 0 ? {
4283
- requiredScopes: requiredScopes.join(' ')
4284
- } : {});
4285
- paramsToEncode = _object_spread$3({}, paramsToEncode, interactionLoginDetails);
4286
- }
4287
- _state.label = 3;
4373
+ if (!client) return [
4374
+ 3,
4375
+ 4
4376
+ ];
4377
+ requestedScopes = interaction.params['scope'].split(' ').filter(Boolean);
4378
+ return [
4379
+ 4,
4380
+ this._isAdminInteractionUser(interaction)
4381
+ ];
4288
4382
  case 3:
4383
+ isAdmin = _state.sent();
4384
+ adminOnlyScopes = isAdmin ? undefined : adminOnlyScopesForOidcProviderConfig(providerConfig);
4385
+ offeredScopes = adminOnlyScopes ? requestedScopes.filter(function(scope) {
4386
+ return !adminOnlyScopes.has(scope);
4387
+ }) : requestedScopes;
4388
+ scopes = offeredScopes.join(' ');
4389
+ // Surface the scopes the client's provider profiles force-require so the consent UI can
4390
+ // render them as required. Intersect with the actually-offered scopes so only visible
4391
+ // scope rows are flagged.
4392
+ requestedScopeSet = new Set(offeredScopes);
4393
+ required = oidcClientProviderProfileScopes(providerConfig.providerProfiles, (_client_dbx_provider_profiles = client.dbx_provider_profiles) !== null && _client_dbx_provider_profiles !== void 0 ? _client_dbx_provider_profiles : undefined).required;
4394
+ requiredScopes = Array.from(required).filter(function(scope) {
4395
+ return requestedScopeSet.has(scope);
4396
+ });
4397
+ interactionLoginDetails = _object_spread$3({
4398
+ client_id: client_id,
4399
+ client_name: client.client_name,
4400
+ client_uri: client.client_uri,
4401
+ logo_uri: client.logo_uri,
4402
+ scopes: scopes
4403
+ }, requiredScopes.length > 0 ? {
4404
+ requiredScopes: requiredScopes.join(' ')
4405
+ } : {});
4406
+ paramsToEncode = _object_spread$3({}, paramsToEncode, interactionLoginDetails);
4407
+ _state.label = 4;
4408
+ case 4:
4289
4409
  paramsString = makeUrlSearchParamsString(paramsToEncode, {
4290
4410
  useUrlSearchSpaceHandling: true
4291
4411
  });
@@ -4420,7 +4540,7 @@ function _ts_generator$5(thisArg, body) {
4420
4540
  value: // MARK: Internal
4421
4541
  function _buildProvider() {
4422
4542
  return _async_to_generator$5(function() {
4423
- var _this, _config_trustProxy, config, findAccount, signingKey, result, getEncryptionKey, cookieKey, adapterFactory, providerConfiguration, _ref, ProviderClass, provider;
4543
+ var _this, _config_trustProxy, config, findAccount, signingKey, result, getEncryptionKey, cookieKey, adapterFactory, providerConfiguration, _ref, ProviderClass, interactionPolicy, provider;
4424
4544
  return _ts_generator$5(this, function(_state) {
4425
4545
  switch(_state.label){
4426
4546
  case 0:
@@ -4461,8 +4581,14 @@ function _ts_generator$5(thisArg, body) {
4461
4581
  import('oidc-provider')
4462
4582
  ];
4463
4583
  case 4:
4464
- _ref = _state.sent(), ProviderClass = _ref.default;
4584
+ _ref = _state.sent(), ProviderClass = _ref.default, interactionPolicy = _ref.interactionPolicy;
4465
4585
  provider = new ProviderClass(config.issuer, _object_spread_props(_object_spread$3({}, providerConfiguration), {
4586
+ // The policy is applied here rather than in buildProviderConfiguration() because it needs the
4587
+ // `interactionPolicy` namespace off the dynamic (ESM-only) import, which that sync method has no
4588
+ // access to. Spread the configured `interactions` so its `url` builder survives.
4589
+ interactions: _object_spread_props(_object_spread$3({}, providerConfiguration.interactions), {
4590
+ policy: buildOidcInteractionPolicy(interactionPolicy)
4591
+ }),
4466
4592
  adapter: adapterFactory,
4467
4593
  findAccount: findAccount,
4468
4594
  jwks: {
@@ -4477,6 +4603,7 @@ function _ts_generator$5(thisArg, body) {
4477
4603
  // issuer's canonical host, so cookies set on the issuer host are not sent
4478
4604
  // on resume → "authorization request has expired".
4479
4605
  provider.proxy = (_config_trustProxy = config.trustProxy) !== null && _config_trustProxy !== void 0 ? _config_trustProxy : true;
4606
+ this._attachProviderErrorLogging(provider);
4480
4607
  if (config.suppressBodyParserWarning) ;
4481
4608
  return [
4482
4609
  2,
@@ -4486,11 +4613,66 @@ function _ts_generator$5(thisArg, body) {
4486
4613
  });
4487
4614
  }).call(this);
4488
4615
  }
4616
+ },
4617
+ {
4618
+ key: "_isAdminInteractionUser",
4619
+ value: /**
4620
+ * Whether the user an interaction resolved to is an admin.
4621
+ *
4622
+ * Reads the same `isAdminUser` delegate the consent admin-only gate uses. Fails closed — an
4623
+ * interaction with no resolved account (the login prompt, before authentication) or a delegate
4624
+ * that does not implement the hook is treated as non-admin, so admin-only scopes are withheld
4625
+ * unless admin status is positively established.
4626
+ *
4627
+ * @param interaction - The interaction whose session account should be checked.
4628
+ * @returns True when the interaction's account resolves to an admin user.
4629
+ */ function _isAdminInteractionUser(interaction) {
4630
+ return _async_to_generator$5(function() {
4631
+ var _ref, _interaction_session, _this_accountService_delegate_isAdminUser, _this_accountService_delegate, accountId;
4632
+ return _ts_generator$5(this, function(_state) {
4633
+ accountId = (_interaction_session = interaction.session) === null || _interaction_session === void 0 ? void 0 : _interaction_session.accountId;
4634
+ return [
4635
+ 2,
4636
+ accountId ? (_ref = (_this_accountService_delegate_isAdminUser = (_this_accountService_delegate = this.accountService.delegate).isAdminUser) === null || _this_accountService_delegate_isAdminUser === void 0 ? void 0 : _this_accountService_delegate_isAdminUser.call(_this_accountService_delegate, this.accountService.userContext(accountId).authUserContext)) !== null && _ref !== void 0 ? _ref : false : false
4637
+ ];
4638
+ });
4639
+ }).call(this);
4640
+ }
4641
+ },
4642
+ {
4643
+ /**
4644
+ * Wires oidc-provider's error events to the Nest logger.
4645
+ *
4646
+ * oidc-provider catches everything thrown inside its koa stack and renders the generic
4647
+ * `{"error":"server_error","error_description":"oops! something went wrong"}` body. The real
4648
+ * cause is only ever handed to the `server_error` event — with no listener it is dropped, and a
4649
+ * failing authorization request is undiagnosable from either the response or the function logs.
4650
+ *
4651
+ * `grant.error` / `introspection.error` / `revocation.error` cover the token-endpoint equivalents.
4652
+ * These are all genuine server-side faults; expected protocol rejections (`invalid_client`,
4653
+ * `access_denied`, …) travel as normal responses and are NOT emitted here, so this stays quiet in
4654
+ * healthy operation.
4655
+ *
4656
+ * @param provider - The constructed oidc-provider instance to attach listeners to.
4657
+ */ key: "_attachProviderErrorLogging",
4658
+ value: function _attachProviderErrorLogging(provider) {
4659
+ var _this = this;
4660
+ var logError = function logError(event) {
4661
+ return function(ctx, err) {
4662
+ var route = ctx ? "".concat(ctx.method, " ").concat(ctx.path) : 'unknown route';
4663
+ _this._logger.error("oidc-provider ".concat(event, " on ").concat(route, ": ").concat(_instanceof$2(err, Error) ? err.stack : String(err)));
4664
+ };
4665
+ };
4666
+ provider.on('server_error', logError('server_error'));
4667
+ provider.on('grant.error', logError('grant.error'));
4668
+ provider.on('introspection.error', logError('introspection.error'));
4669
+ provider.on('revocation.error', logError('revocation.error'));
4670
+ }
4489
4671
  }
4490
4672
  ]);
4491
4673
  return OidcService;
4492
4674
  }();
4493
- OidcService = __decorate([
4675
+ OidcService = OidcService_1 = __decorate([
4494
4676
  Injectable(),
4495
4677
  __param(0, Inject(OidcModuleConfig)),
4496
4678
  __param(1, Inject(OidcProviderConfigService)),
@@ -6265,9 +6447,9 @@ var OidcInteractionController_1;
6265
6447
  case 5:
6266
6448
  interaction = _state.sent();
6267
6449
  prompt = interaction.prompt, params = interaction.params, session = interaction.session;
6268
- clientId = params.client_id;
6450
+ clientId = params['client_id'];
6269
6451
  accountId = (_ref = session === null || session === void 0 ? void 0 : session.accountId) !== null && _ref !== void 0 ? _ref : '';
6270
- missingOIDCScope = (_prompt_details_missingOIDCScope = prompt.details.missingOIDCScope) !== null && _prompt_details_missingOIDCScope !== void 0 ? _prompt_details_missingOIDCScope : [];
6452
+ missingOIDCScope = (_prompt_details_missingOIDCScope = prompt.details['missingOIDCScope']) !== null && _prompt_details_missingOIDCScope !== void 0 ? _prompt_details_missingOIDCScope : [];
6271
6453
  if (!interaction.grantId) return [
6272
6454
  3,
6273
6455
  7
@@ -6405,8 +6587,13 @@ var OidcInteractionController_1;
6405
6587
  // cannot know the caller's admin status when it builds that request. Gating on the request would
6406
6588
  // make an admin-only scope in `scopes_supported` fatal for every non-admin — deselecting it at
6407
6589
  // consent has to be a way through.
6590
+ //
6591
+ // A non-admin should not normally reach this gate at all: the consent URL builder withholds
6592
+ // admin-only scopes from their consent screen, so the scope never enters the consented set (see
6593
+ // `adminOnlyScopesForOidcProviderConfig`, which both sides read). This remains as defense in
6594
+ // depth for a consent submit that names the scope anyway.
6408
6595
  configAdminOnlyScopes = (_this_accountService_providerConfig_adminOnlyScopes = this.accountService.providerConfig.adminOnlyScopes) !== null && _this_accountService_providerConfig_adminOnlyScopes !== void 0 ? _this_accountService_providerConfig_adminOnlyScopes : [];
6409
- adminOnlyScopes = new Set(_to_consumable_array$1(configAdminOnlyScopes).concat(_to_consumable_array$1(adminOnlyScopesForOidcProviderProfiles(providerProfiles !== null && providerProfiles !== void 0 ? providerProfiles : []))));
6596
+ adminOnlyScopes = adminOnlyScopesForOidcProviderConfig(this.accountService.providerConfig);
6410
6597
  consentedAdminOnlyScopes = Array.from(adminOnlyScopes).filter(function(scope) {
6411
6598
  return consentedOIDCScopeSet.has(scope);
6412
6599
  });
@@ -6526,7 +6713,7 @@ var OidcInteractionController_1;
6526
6713
  }
6527
6714
  }
6528
6715
  encounteredOIDCClaims = grant.getOIDCClaimsEncountered();
6529
- missingOIDCClaims = (_prompt_details_missingOIDCClaims = prompt.details.missingOIDCClaims) !== null && _prompt_details_missingOIDCClaims !== void 0 ? _prompt_details_missingOIDCClaims : [];
6716
+ missingOIDCClaims = (_prompt_details_missingOIDCClaims = prompt.details['missingOIDCClaims']) !== null && _prompt_details_missingOIDCClaims !== void 0 ? _prompt_details_missingOIDCClaims : [];
6530
6717
  if (missingOIDCClaims.length > 0) {
6531
6718
  _resolveEffectiveSubset = resolveEffectiveSubset({
6532
6719
  missing: missingOIDCClaims,
@@ -6540,7 +6727,7 @@ var OidcInteractionController_1;
6540
6727
  grant.rejectOIDCClaims(rejected1);
6541
6728
  }
6542
6729
  }
6543
- missingResourceScopes = (_prompt_details_missingResourceScopes = prompt.details.missingResourceScopes) !== null && _prompt_details_missingResourceScopes !== void 0 ? _prompt_details_missingResourceScopes : {};
6730
+ missingResourceScopes = (_prompt_details_missingResourceScopes = prompt.details['missingResourceScopes']) !== null && _prompt_details_missingResourceScopes !== void 0 ? _prompt_details_missingResourceScopes : {};
6544
6731
  _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
6545
6732
  try {
6546
6733
  for(_iterator1 = Object.entries(missingResourceScopes)[Symbol.iterator](); !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
@@ -7818,4 +8005,4 @@ function _unsupported_iterable_to_array(o, minLen) {
7818
8005
  };
7819
8006
  }
7820
8007
 
7821
- export { DBX_FIREBASE_SERVER_OIDC_PROVIDER_PROFILES_CLIENT_METADATA, DEFAULT_APP_OAUTH_CONSENT_PATH_PART, DEFAULT_APP_OAUTH_INTERACTION_PATH, DEFAULT_APP_OAUTH_LOGIN_PATH_PART, DEFAULT_MAX_ADMIN_LOGIN_DURATION_SECONDS, DEFAULT_MAX_NONADMIN_LOGIN_DURATION_SECONDS, DEFAULT_MAX_REQUESTED_LOGIN_DURATION_SECONDS, DEFAULT_MAX_SERVICE_TOKEN_LOGIN_DURATION_SECONDS, DEFAULT_MIN_REQUESTED_LOGIN_DURATION_SECONDS, DEFAULT_OIDC_ANALYTICS_EVENT_NAMES, DEFAULT_OIDC_ANALYTICS_EVENT_NAME_PREFIX, DEFAULT_OIDC_CODE_CHALLENGE_METHODS, DEFAULT_OIDC_ID_TOKEN_SIGNING_ALG_VALUES, DEFAULT_OIDC_ISSUER_PATH, DEFAULT_OIDC_ROUTES, DEFAULT_OIDC_SUBJECT_TYPES, DEFAULT_OIDC_TOKEN_ENDPOINT_AUTH_METHODS, DEFAULT_OIDC_TOKEN_LIFETIMES, DEFAULT_ROTATED_KEY_MAX_AGE, FIREBASE_SERVER_OIDC_ANALYTICS_CONFIG, FIREBASE_SERVER_OIDC_ROUTES_FOR_GLOBAL_ROUTE_EXCLUDE, FirebaseServerOidcAnalyticsService, GRANTABLE_MODEL_NAMES, JwksFirestoreCollections, JwksKeyDocument, JwksService, JwksServiceConfig, JwksServiceStorageConfig, OIDC_ANALYTICS_SERVICE, OIDC_ENCRYPTED_PAYLOAD_FIELDS, OIDC_JSON_RENDER_ERROR_FUNCTION, OIDC_JWKS_ENCRYPTION_SECRET_ENV_KEY, OidcAccountService, OidcAccountServiceDelegate, OidcAccountServiceUserContext, OidcAnalyticsService, OidcAuth, OidcAuthBearerTokenMiddleware, OidcAuthMiddlewareConfig, OidcClientService, OidcEncryptionService, OidcInteractionController, OidcInteractionService, OidcModelServerActions, OidcModuleConfig, OidcProviderConfigService, OidcProviderController, OidcServerFirestoreCollections, OidcService, OidcWellKnownController, activeJwksKeysQuery, allOidcScopesStringForProviderConfig, appOidcAnalyticsModuleMetadata, appOidcModelModuleMetadata, applyOidcAuthMiddleware, applyOidcCorsMiddleware, buildBearerChallenge, buildFirebaseServerMcpResourceServer, createAdapterFactory, createOidcClientFactory, deleteOidcClientFactory, deleteOidcTokenFactory, deriveResourceMetadataUrlFromEnv, emitOidcAnalyticsEvent, getOidcScopesFromRequest, jwksKeyCollectionReference, jwksKeyConverter, jwksKeyFirestoreCollection, jwksKeyIdentity, jwksKeysWithStatusQuery, nonRetiredJwksKeysQuery, noopOidcAnalyticsService, oidcClientProviderProfileScopes, oidcCorsOriginDelegate, oidcFirestoreCollectionsFactory, oidcModelServerActions, oidcModelServerActionsFactory, oidcModuleConfigFactory, oidcModuleMetadata, resolveEffectiveSubset, rotateOidcClientSecretFactory, rotatedJwksKeysQuery, updateOidcClientFactory };
8008
+ export { DBX_FIREBASE_SERVER_OIDC_PROVIDER_PROFILES_CLIENT_METADATA, DEFAULT_APP_OAUTH_CONSENT_PATH_PART, DEFAULT_APP_OAUTH_INTERACTION_PATH, DEFAULT_APP_OAUTH_LOGIN_PATH_PART, DEFAULT_MAX_ADMIN_LOGIN_DURATION_SECONDS, DEFAULT_MAX_NONADMIN_LOGIN_DURATION_SECONDS, DEFAULT_MAX_REQUESTED_LOGIN_DURATION_SECONDS, DEFAULT_MAX_SERVICE_TOKEN_LOGIN_DURATION_SECONDS, DEFAULT_MIN_REQUESTED_LOGIN_DURATION_SECONDS, DEFAULT_OIDC_ANALYTICS_EVENT_NAMES, DEFAULT_OIDC_ANALYTICS_EVENT_NAME_PREFIX, DEFAULT_OIDC_CODE_CHALLENGE_METHODS, DEFAULT_OIDC_ID_TOKEN_SIGNING_ALG_VALUES, DEFAULT_OIDC_ISSUER_PATH, DEFAULT_OIDC_ROUTES, DEFAULT_OIDC_SUBJECT_TYPES, DEFAULT_OIDC_TOKEN_ENDPOINT_AUTH_METHODS, DEFAULT_OIDC_TOKEN_LIFETIMES, DEFAULT_ROTATED_KEY_MAX_AGE, FIREBASE_SERVER_OIDC_ANALYTICS_CONFIG, FIREBASE_SERVER_OIDC_ROUTES_FOR_GLOBAL_ROUTE_EXCLUDE, FirebaseServerOidcAnalyticsService, GRANTABLE_MODEL_NAMES, JwksFirestoreCollections, JwksKeyDocument, JwksService, JwksServiceConfig, JwksServiceStorageConfig, OIDC_ANALYTICS_SERVICE, OIDC_ENCRYPTED_PAYLOAD_FIELDS, OIDC_JSON_RENDER_ERROR_FUNCTION, OIDC_JWKS_ENCRYPTION_SECRET_ENV_KEY, OidcAccountService, OidcAccountServiceDelegate, OidcAccountServiceUserContext, OidcAnalyticsService, OidcAuth, OidcAuthBearerTokenMiddleware, OidcAuthMiddlewareConfig, OidcClientService, OidcEncryptionService, OidcInteractionController, OidcInteractionService, OidcModelServerActions, OidcModuleConfig, OidcProviderConfigService, OidcProviderController, OidcServerFirestoreCollections, OidcService, OidcWellKnownController, STALE_SESSION_ACCOUNT_CHECK_REASON, activeJwksKeysQuery, adminOnlyScopesForOidcProviderConfig, allOidcScopesStringForProviderConfig, appOidcAnalyticsModuleMetadata, appOidcModelModuleMetadata, applyOidcAuthMiddleware, applyOidcCorsMiddleware, buildBearerChallenge, buildFirebaseServerMcpResourceServer, buildOidcInteractionPolicy, createAdapterFactory, createOidcClientFactory, deleteOidcClientFactory, deleteOidcTokenFactory, deriveResourceMetadataUrlFromEnv, emitOidcAnalyticsEvent, getOidcScopesFromRequest, jwksKeyCollectionReference, jwksKeyConverter, jwksKeyFirestoreCollection, jwksKeyIdentity, jwksKeysWithStatusQuery, nonRetiredJwksKeysQuery, noopOidcAnalyticsService, oidcClientProviderProfileScopes, oidcCorsOriginDelegate, oidcFirestoreCollectionsFactory, oidcModelServerActions, oidcModelServerActionsFactory, oidcModuleConfigFactory, oidcModuleMetadata, resolveEffectiveSubset, rotateOidcClientSecretFactory, rotatedJwksKeysQuery, updateOidcClientFactory };
package/oidc/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@dereekb/firebase-server/oidc",
3
- "version": "13.36.0",
3
+ "version": "13.38.0",
4
4
  "peerDependencies": {
5
- "@dereekb/analytics": "13.36.0",
6
- "@dereekb/date": "13.36.0",
7
- "@dereekb/firebase": "13.36.0",
8
- "@dereekb/firebase-server": "13.36.0",
9
- "@dereekb/model": "13.36.0",
10
- "@dereekb/nestjs": "13.36.0",
11
- "@dereekb/rxjs": "13.36.0",
12
- "@dereekb/util": "13.36.0",
13
- "@dereekb/zoho": "13.36.0",
5
+ "@dereekb/analytics": "13.38.0",
6
+ "@dereekb/date": "13.38.0",
7
+ "@dereekb/firebase": "13.38.0",
8
+ "@dereekb/firebase-server": "13.38.0",
9
+ "@dereekb/model": "13.38.0",
10
+ "@dereekb/nestjs": "13.38.0",
11
+ "@dereekb/rxjs": "13.38.0",
12
+ "@dereekb/util": "13.38.0",
13
+ "@dereekb/zoho": "13.38.0",
14
14
  "@nestjs/common": "^11.1.19",
15
15
  "@nestjs/config": "^4.0.4",
16
16
  "express": "^5.2.1",