@dereekb/dbx-firebase 13.11.5 → 13.11.7
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.
|
@@ -487,6 +487,18 @@ const DEFAULT_OIDC_TOKEN_ENDPOINT_AUTH_METHODS = ['client_secret_post', 'client_
|
|
|
487
487
|
* Apps provide a concrete implementation via `provideDbxFirebaseOidc()`.
|
|
488
488
|
*/
|
|
489
489
|
class DbxFirebaseOidcConfig {
|
|
490
|
+
/**
|
|
491
|
+
* Optional API origin (scheme + host, e.g. `https://api.example.com`) prepended to the OIDC
|
|
492
|
+
* authorization and interaction endpoint paths when set.
|
|
493
|
+
*
|
|
494
|
+
* Use this when the OIDC provider is hosted on a different origin than the frontend so that
|
|
495
|
+
* the authorization redirect and interaction POSTs target the issuer host directly (e.g. to
|
|
496
|
+
* avoid an intermediate hosting layer that strips cookies). Should not include a trailing
|
|
497
|
+
* slash and should not include the `/api` path segment — OIDC endpoints live at the root.
|
|
498
|
+
*
|
|
499
|
+
* Leave unset for single-origin deployments; the endpoint paths stay relative.
|
|
500
|
+
*/
|
|
501
|
+
oidcApiOrigin;
|
|
490
502
|
/**
|
|
491
503
|
* Path to the authorization endpoint. Defaults to '/oidc/auth'.
|
|
492
504
|
*/
|
|
@@ -532,10 +544,12 @@ class DbxFirebaseOidcConfigService {
|
|
|
532
544
|
return this.config.availableScopes;
|
|
533
545
|
}
|
|
534
546
|
get oidcAuthorizationEndpointApiPath() {
|
|
535
|
-
|
|
547
|
+
const origin = this.config.oidcApiOrigin ?? '';
|
|
548
|
+
return `${origin}${this.config.oidcAuthorizationEndpointApiPath ?? DEFAULT_OIDC_AUTHORIZATION_ENDPOINT_PATH}`;
|
|
536
549
|
}
|
|
537
550
|
get oidcInteractionEndpointApiPath() {
|
|
538
|
-
|
|
551
|
+
const origin = this.config.oidcApiOrigin ?? '';
|
|
552
|
+
return `${origin}${this.config.oidcInteractionEndpointApiPath ?? DEFAULT_OIDC_INTERACTION_ENDPOINT_PATH}`;
|
|
539
553
|
}
|
|
540
554
|
get tokenEndpointAuthMethods() {
|
|
541
555
|
return this.config.tokenEndpointAuthMethods ?? DEFAULT_OIDC_TOKEN_ENDPOINT_AUTH_METHODS;
|