@auth0/auth0-angular 2.3.0 → 2.4.1

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/README.md CHANGED
@@ -4,6 +4,7 @@ A library for integrating [Auth0](https://auth0.com) into an Angular application
4
4
 
5
5
  ![Release](https://img.shields.io/npm/v/@auth0/auth0-angular)
6
6
  [![Codecov](https://img.shields.io/codecov/c/github/auth0/auth0-angular)](https://codecov.io/gh/auth0/auth0-angular)
7
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/auth0/auth0-angular)
7
8
  ![Downloads](https://img.shields.io/npm/dw/@auth0/auth0-angular)
8
9
  [![License](https://img.shields.io/:license-MIT-blue.svg?style=flat)](https://opensource.org/licenses/MIT)
9
10
  [![CircleCI](https://img.shields.io/circleci/build/github/auth0/auth0-angular)](https://circleci.com/gh/auth0/auth0-angular)
@@ -63,14 +64,35 @@ Take note of the **Client ID** and **Domain** values under the "Basic Informatio
63
64
 
64
65
  #### Static configuration
65
66
 
66
- Install the SDK into your application by importing `AuthModule.forRoot()` and configuring with your Auth0 domain and client id, as well as the URL to which Auth0 should redirect back after succesful authentication:
67
+ The recommended approach is to use the functional `provideAuth0()` in your application configuration:
68
+
69
+ ```ts
70
+ import { ApplicationConfig } from '@angular/core';
71
+ import { provideAuth0 } from '@auth0/auth0-angular';
72
+
73
+ export const appConfig: ApplicationConfig = {
74
+ providers: [
75
+ provideAuth0({
76
+ domain: 'YOUR_AUTH0_DOMAIN',
77
+ clientId: 'YOUR_AUTH0_CLIENT_ID',
78
+ authorizationParams: {
79
+ redirect_uri: window.location.origin,
80
+ },
81
+ }),
82
+ ],
83
+ };
84
+ ```
85
+
86
+ <details>
87
+ <summary>Using NgModules</summary>
88
+
89
+ If you're using NgModules, you can configure the SDK using `AuthModule.forRoot()`:
67
90
 
68
91
  ```ts
69
92
  import { NgModule } from '@angular/core';
70
93
  import { AuthModule } from '@auth0/auth0-angular';
71
94
 
72
95
  @NgModule({
73
- // ...
74
96
  imports: [
75
97
  AuthModule.forRoot({
76
98
  domain: 'YOUR_AUTH0_DOMAIN',
@@ -80,53 +102,80 @@ import { AuthModule } from '@auth0/auth0-angular';
80
102
  },
81
103
  }),
82
104
  ],
83
- // ...
84
105
  })
85
106
  export class AppModule {}
86
107
  ```
87
108
 
109
+ </details>
110
+
88
111
  #### Dynamic configuration
89
112
 
90
- Instead of using `AuthModule.forRoot` to specify auth configuration, you can provide a factory function using `APP_INITIALIZER` to load your config from an external source before the auth module is loaded, and provide your configuration using `AuthClientConfig.set`.
113
+ Instead of providing static configuration, you can use `provideAppInitializer` to load your config from an external source before the SDK is instantiated, and configure it using `AuthClientConfig.set`.
91
114
 
92
- The configuration will only be used initially when the SDK is instantiated. Any changes made to the configuration at a later moment in time will have no effect on the default options used when calling the SDK's methods. This is also the reason why the dynamic configuration should be set using an `APP_INITIALIZER`, because doing so ensures the configuration is available prior to instantiating the SDK.
115
+ ```ts
116
+ import { ApplicationConfig, inject, provideAppInitializer } from '@angular/core';
117
+ import { provideHttpClient, HttpBackend, HttpClient } from '@angular/common/http';
118
+ import { provideAuth0, AuthClientConfig } from '@auth0/auth0-angular';
93
119
 
94
- > :information_source: Any request made through an instance of `HttpClient` that got instantiated by Angular, will use all of the configured interceptors, including our `AuthHttpInterceptor`. Because the `AuthHttpInterceptor` requires the existence of configuration settings, the request for retrieving those dynamic configuration settings should ensure it's not using any of those interceptors. In Angular, this can be done by manually instantiating `HttpClient` using an injected `HttpBackend` instance.
120
+ export function configInitializer(handler: HttpBackend, config: AuthClientConfig) {
121
+ return () =>
122
+ new HttpClient(handler)
123
+ .get('/config')
124
+ .toPromise()
125
+ .then((loadedConfig: any) => config.set(loadedConfig));
126
+ }
127
+
128
+ export const appConfig: ApplicationConfig = {
129
+ providers: [
130
+ provideHttpClient(),
131
+ provideAuth0(),
132
+ provideAppInitializer(() => {
133
+ const handler = inject(HttpBackend);
134
+ const config = inject(AuthClientConfig);
135
+ return configInitializer(handler, config)();
136
+ }),
137
+ ],
138
+ };
139
+ ```
140
+
141
+ > **Important:** The configuration will only be used initially when the SDK is instantiated. Any changes made to the configuration at a later moment in time will have no effect on the default options used when calling the SDK's methods. This is why the dynamic configuration should be set using an app initializer, which ensures the configuration is available prior to instantiating the SDK.
142
+
143
+ > :information_source: Any request made through an instance of `HttpClient` that got instantiated by Angular will use all configured interceptors, including our `AuthHttpInterceptor`. Because the `AuthHttpInterceptor` requires the existence of configuration settings, the request for retrieving those dynamic configuration settings should ensure it's not using any interceptors. In Angular, this can be done by manually instantiating `HttpClient` using an injected `HttpBackend` instance.
144
+
145
+ <details>
146
+ <summary>Using NgModules</summary>
95
147
 
96
- ```js
148
+ Instead of using `AuthModule.forRoot` to specify auth configuration, you can provide a factory function using `APP_INITIALIZER` to load your config from an external source before the auth module is loaded, and provide your configuration using `AuthClientConfig.set`.
149
+
150
+ ```ts
151
+ import { APP_INITIALIZER } from '@angular/core';
152
+ import { HttpClientModule, HttpClient, HttpBackend } from '@angular/common/http';
97
153
  import { AuthModule, AuthClientConfig } from '@auth0/auth0-angular';
98
154
 
99
- // Provide an initializer function that returns a Promise
100
- function configInitializer(
101
- handler: HttpBackend,
102
- config: AuthClientConfig
103
- ) {
155
+ function configInitializer(handler: HttpBackend, config: AuthClientConfig) {
104
156
  return () =>
105
157
  new HttpClient(handler)
106
158
  .get('/config')
107
159
  .toPromise()
108
- // Set the config that was loaded asynchronously here
109
160
  .then((loadedConfig: any) => config.set(loadedConfig));
110
161
  }
111
162
 
112
- export class AppModule {
113
- // ...
114
- imports: [
115
- HttpClientModule,
116
- AuthModule.forRoot(), // <- don't pass any config here
117
- ],
163
+ @NgModule({
164
+ imports: [HttpClientModule, AuthModule.forRoot()],
118
165
  providers: [
119
166
  {
120
167
  provide: APP_INITIALIZER,
121
- useFactory: configInitializer, // <- pass your initializer function here
168
+ useFactory: configInitializer,
122
169
  deps: [HttpBackend, AuthClientConfig],
123
170
  multi: true,
124
171
  },
125
172
  ],
126
- // ...
127
- }
173
+ })
174
+ export class AppModule {}
128
175
  ```
129
176
 
177
+ </details>
178
+
130
179
  ### Add login to your application
131
180
 
132
181
  To log the user into the application, inject the `AuthService` and call its `loginWithRedirect` method.
@@ -1,14 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
- import { VERSION, InjectionToken, Injectable, Optional, Inject, NgModule, inject } from '@angular/core';
2
+ import { VERSION, InjectionToken, Optional, Inject, Injectable, NgModule, inject } from '@angular/core';
3
3
  import { BehaviorSubject, Subject, ReplaySubject, merge, defer, of, iif, from, throwError } from 'rxjs';
4
4
  import { scan, filter, distinctUntilChanged, switchMap, mergeMap, shareReplay, concatMap, catchError, tap, takeUntil, withLatestFrom, map, take, first, mapTo, pluck } from 'rxjs/operators';
5
5
  import * as i4 from '@auth0/auth0-spa-js';
6
6
  import { Auth0Client } from '@auth0/auth0-spa-js';
7
- export { AuthenticationError, GenericError, InMemoryCache, LocalStorageCache, MfaRequiredError, MissingRefreshTokenError, PopupCancelledError, PopupTimeoutError, TimeoutError, User } from '@auth0/auth0-spa-js';
7
+ export { AuthenticationError, GenericError, InMemoryCache, LocalStorageCache, MfaRequiredError, MissingRefreshTokenError, PopupCancelledError, PopupTimeoutError, TimeoutError, UseDpopNonceError, User } from '@auth0/auth0-spa-js';
8
8
  import { Router } from '@angular/router';
9
9
  import * as i1 from '@angular/common';
10
10
 
11
- var useragent = { name: '@auth0/auth0-angular', version: '2.3.0' };
11
+ var useragent = { name: '@auth0/auth0-angular', version: '2.4.1' };
12
12
 
13
13
  class Auth0ClientFactory {
14
14
  static createClient(configFactory) {
@@ -112,10 +112,10 @@ class AuthClientConfig {
112
112
  get() {
113
113
  return this.config;
114
114
  }
115
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthClientConfig, deps: [{ token: AuthConfigService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
116
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthClientConfig, providedIn: 'root' }); }
115
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthClientConfig, deps: [{ token: AuthConfigService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
116
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthClientConfig, providedIn: 'root' }); }
117
117
  }
118
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthClientConfig, decorators: [{
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthClientConfig, decorators: [{
119
119
  type: Injectable,
120
120
  args: [{ providedIn: 'root' }]
121
121
  }], ctorParameters: () => [{ type: undefined, decorators: [{
@@ -146,10 +146,10 @@ class AbstractNavigator {
146
146
  }
147
147
  this.location.replaceState(url);
148
148
  }
149
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractNavigator, deps: [{ token: i1.Location }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
150
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractNavigator, providedIn: 'root' }); }
149
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AbstractNavigator, deps: [{ token: i1.Location }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
150
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AbstractNavigator, providedIn: 'root' }); }
151
151
  }
152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AbstractNavigator, decorators: [{
152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AbstractNavigator, decorators: [{
153
153
  type: Injectable,
154
154
  args: [{
155
155
  providedIn: 'root',
@@ -239,10 +239,10 @@ class AuthState {
239
239
  setError(error) {
240
240
  this.errorSubject$.next(error);
241
241
  }
242
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthState, deps: [{ token: Auth0ClientService }], target: i0.ɵɵFactoryTarget.Injectable }); }
243
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthState, providedIn: 'root' }); }
242
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthState, deps: [{ token: Auth0ClientService }], target: i0.ɵɵFactoryTarget.Injectable }); }
243
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthState, providedIn: 'root' }); }
244
244
  }
245
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthState, decorators: [{
245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthState, decorators: [{
246
246
  type: Injectable,
247
247
  args: [{ providedIn: 'root' }]
248
248
  }], ctorParameters: () => [{ type: i4.Auth0Client, decorators: [{
@@ -453,6 +453,69 @@ class AuthService {
453
453
  this.navigator.navigateByUrl(target);
454
454
  }), map(([result]) => result));
455
455
  }
456
+ /**
457
+ * ```js
458
+ * getDpopNonce(id).subscribe(nonce => ...)
459
+ * ```
460
+ *
461
+ * Gets the DPoP nonce for the specified domain or the default domain.
462
+ * The nonce is used in DPoP proof generation for token binding.
463
+ *
464
+ * @param id Optional identifier for the domain. If not provided, uses the default domain.
465
+ * @returns An Observable that emits the DPoP nonce string or undefined if not available.
466
+ */
467
+ getDpopNonce(id) {
468
+ return from(this.auth0Client.getDpopNonce(id));
469
+ }
470
+ /**
471
+ * ```js
472
+ * setDpopNonce(nonce, id).subscribe(() => ...)
473
+ * ```
474
+ *
475
+ * Sets the DPoP nonce for the specified domain or the default domain.
476
+ * This is typically used after receiving a new nonce from the authorization server.
477
+ *
478
+ * @param nonce The DPoP nonce value to set.
479
+ * @param id Optional identifier for the domain. If not provided, uses the default domain.
480
+ * @returns An Observable that completes when the nonce is set.
481
+ */
482
+ setDpopNonce(nonce, id) {
483
+ return from(this.auth0Client.setDpopNonce(nonce, id));
484
+ }
485
+ /**
486
+ * ```js
487
+ * generateDpopProof(params).subscribe(proof => ...)
488
+ * ```
489
+ *
490
+ * Generates a DPoP (Demonstrating Proof-of-Possession) proof JWT.
491
+ * This proof is used to bind access tokens to a specific client, providing
492
+ * an additional layer of security for token usage.
493
+ *
494
+ * @param params Configuration for generating the DPoP proof
495
+ * @param params.url The URL of the resource server endpoint
496
+ * @param params.method The HTTP method (e.g., 'GET', 'POST')
497
+ * @param params.nonce Optional DPoP nonce from the authorization server
498
+ * @param params.accessToken The access token to bind to the proof
499
+ * @returns An Observable that emits the generated DPoP proof as a JWT string.
500
+ */
501
+ generateDpopProof(params) {
502
+ return from(this.auth0Client.generateDpopProof(params));
503
+ }
504
+ /**
505
+ * ```js
506
+ * const fetcher = createFetcher(config);
507
+ * ```
508
+ *
509
+ * Creates a custom fetcher instance that can be used to make authenticated
510
+ * HTTP requests. The fetcher automatically handles token refresh and can
511
+ * be configured with custom request/response handling.
512
+ *
513
+ * @param config Optional configuration for the fetcher
514
+ * @returns A Fetcher instance configured with the Auth0 client.
515
+ */
516
+ createFetcher(config) {
517
+ return this.auth0Client.createFetcher(config);
518
+ }
456
519
  shouldHandleCallback() {
457
520
  return of(location.search).pipe(map((search) => {
458
521
  const searchParams = new URLSearchParams(search);
@@ -461,10 +524,10 @@ class AuthService {
461
524
  !this.configFactory.get().skipRedirectCallback);
462
525
  }));
463
526
  }
464
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthService, deps: [{ token: Auth0ClientService }, { token: AuthClientConfig }, { token: AbstractNavigator }, { token: AuthState }], target: i0.ɵɵFactoryTarget.Injectable }); }
465
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthService, providedIn: 'root' }); }
527
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthService, deps: [{ token: Auth0ClientService }, { token: AuthClientConfig }, { token: AbstractNavigator }, { token: AuthState }], target: i0.ɵɵFactoryTarget.Injectable }); }
528
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthService, providedIn: 'root' }); }
466
529
  }
467
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthService, decorators: [{
530
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthService, decorators: [{
468
531
  type: Injectable,
469
532
  args: [{
470
533
  providedIn: 'root',
@@ -499,10 +562,10 @@ class AuthGuard {
499
562
  return of(true);
500
563
  }));
501
564
  }
502
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthGuard, deps: [{ token: AuthService }], target: i0.ɵɵFactoryTarget.Injectable }); }
503
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthGuard, providedIn: 'root' }); }
565
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthGuard, deps: [{ token: AuthService }], target: i0.ɵɵFactoryTarget.Injectable }); }
566
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthGuard, providedIn: 'root' }); }
504
567
  }
505
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthGuard, decorators: [{
568
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthGuard, decorators: [{
506
569
  type: Injectable,
507
570
  args: [{
508
571
  providedIn: 'root',
@@ -534,11 +597,11 @@ class AuthModule {
534
597
  ],
535
598
  };
536
599
  }
537
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
538
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: AuthModule }); }
539
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthModule }); }
600
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
601
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: AuthModule }); }
602
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthModule }); }
540
603
  }
541
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthModule, decorators: [{
604
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthModule, decorators: [{
542
605
  type: NgModule
543
606
  }] });
544
607
 
@@ -587,7 +650,12 @@ class AuthHttpInterceptor {
587
650
  * @param options The options for configuring the token fetch.
588
651
  */
589
652
  getAccessTokenSilently(options) {
590
- return of(this.auth0Client).pipe(concatMap((client) => client.getTokenSilently(options)), tap((token) => this.authState.setAccessToken(token)), catchError((error) => {
653
+ return of(this.auth0Client).pipe(concatMap((client) => client.getTokenSilently(options)), map((tokenOrResponse) => {
654
+ // Extract access_token from detailed response when detailedResponse: true
655
+ if (typeof tokenOrResponse === 'string')
656
+ return tokenOrResponse;
657
+ return tokenOrResponse.access_token;
658
+ }), tap((token) => this.authState.setAccessToken(token)), catchError((error) => {
591
659
  this.authState.refresh();
592
660
  return throwError(error);
593
661
  }));
@@ -656,10 +724,10 @@ class AuthHttpInterceptor {
656
724
  !!route.allowAnonymous &&
657
725
  ['login_required', 'consent_required', 'missing_refresh_token'].includes(err.error));
658
726
  }
659
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthHttpInterceptor, deps: [{ token: AuthClientConfig }, { token: Auth0ClientService }, { token: AuthState }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Injectable }); }
660
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthHttpInterceptor }); }
727
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthHttpInterceptor, deps: [{ token: AuthClientConfig }, { token: Auth0ClientService }, { token: AuthState }, { token: AuthService }], target: i0.ɵɵFactoryTarget.Injectable }); }
728
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthHttpInterceptor }); }
661
729
  }
662
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthHttpInterceptor, decorators: [{
730
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: AuthHttpInterceptor, decorators: [{
663
731
  type: Injectable
664
732
  }], ctorParameters: () => [{ type: AuthClientConfig }, { type: i4.Auth0Client, decorators: [{
665
733
  type: Inject,
@@ -1 +1 @@
1
- {"version":3,"file":"auth0-auth0-angular.mjs","sources":["../../../projects/auth0-angular/src/useragent.ts","../../../projects/auth0-angular/src/lib/auth.client.ts","../../../projects/auth0-angular/src/lib/auth.config.ts","../../../projects/auth0-angular/src/lib/abstract-navigator.ts","../../../projects/auth0-angular/src/lib/auth.state.ts","../../../projects/auth0-angular/src/lib/auth.service.ts","../../../projects/auth0-angular/src/lib/auth.guard.ts","../../../projects/auth0-angular/src/lib/auth.module.ts","../../../projects/auth0-angular/src/lib/auth.interceptor.ts","../../../projects/auth0-angular/src/lib/provide.ts","../../../projects/auth0-angular/src/lib/functional.ts","../../../projects/auth0-angular/src/public-api.ts","../../../projects/auth0-angular/src/auth0-auth0-angular.ts"],"sourcesContent":["export default { name: '@auth0/auth0-angular', version: '2.3.0' };\n","import { InjectionToken, VERSION } from '@angular/core';\nimport { Auth0Client } from '@auth0/auth0-spa-js';\nimport { AuthClientConfig } from './auth.config';\nimport useragent from '../useragent';\n\nexport class Auth0ClientFactory {\n static createClient(configFactory: AuthClientConfig): Auth0Client {\n const config = configFactory.get();\n\n if (!config) {\n throw new Error(\n 'Configuration must be specified either through AuthModule.forRoot or through AuthClientConfig.set'\n );\n }\n\n return new Auth0Client({\n ...config,\n auth0Client: {\n name: useragent.name,\n version: useragent.version,\n env: {\n 'angular/core': VERSION.full,\n },\n },\n });\n }\n}\n\nexport const Auth0ClientService = new InjectionToken<Auth0Client>(\n 'auth0.client'\n);\n","import {\n Auth0ClientOptions,\n CacheLocation,\n GetTokenSilentlyOptions,\n ICache,\n} from '@auth0/auth0-spa-js';\n\nimport { InjectionToken, Injectable, Optional, Inject } from '@angular/core';\n\n/**\n * Defines a common set of HTTP methods.\n */\nexport const enum HttpMethod {\n Get = 'GET',\n Post = 'POST',\n Put = 'PUT',\n Patch = 'PATCH',\n Delete = 'DELETE',\n Head = 'HEAD',\n}\n\n/**\n * Defines the type for a route config entry. Can either be:\n *\n * - an object of type HttpInterceptorRouteConfig\n * - a string\n */\nexport type ApiRouteDefinition = HttpInterceptorRouteConfig | string;\n\n/**\n * A custom type guard to help identify route definitions that are actually HttpInterceptorRouteConfig types.\n *\n * @param def The route definition type\n */\nexport function isHttpInterceptorRouteConfig(\n def: ApiRouteDefinition\n): def is HttpInterceptorRouteConfig {\n return typeof def !== 'string';\n}\n\n/**\n * Configuration for the HttpInterceptor\n */\nexport interface HttpInterceptorConfig {\n allowedList: ApiRouteDefinition[];\n}\n\n/**\n * Configuration for a single interceptor route\n */\nexport interface HttpInterceptorRouteConfig {\n /**\n * The URL to test, by supplying the URL to match.\n * If `test` is a match for the current request path from the HTTP client, then\n * an access token is attached to the request in the\n * [\"Authorization\" header](https://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-20#section-2.1).\n *\n * If the test does not pass, the request proceeds without the access token attached.\n *\n * A wildcard character can be used to match only the start of the URL.\n *\n * @usagenotes\n *\n * '/api' - exactly match the route /api\n * '/api/*' - match any route that starts with /api/\n */\n uri?: string;\n\n /**\n * A function that will be called with the HttpRequest.url value, allowing you to do\n * any kind of flexible matching.\n *\n * If this function returns true, then\n * an access token is attached to the request in the\n * [\"Authorization\" header](https://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-20#section-2.1).\n *\n * If it returns false, the request proceeds without the access token attached.\n */\n uriMatcher?: (uri: string) => boolean;\n\n /**\n * The options that are passed to the SDK when retrieving the\n * access token to attach to the outgoing request.\n */\n tokenOptions?: GetTokenSilentlyOptions;\n\n /**\n * The HTTP method to match on. If specified, the HTTP method of\n * the outgoing request will be checked against this. If there is no match, the\n * Authorization header is not attached.\n *\n * The HTTP method name is case-sensitive.\n */\n httpMethod?: HttpMethod | string;\n\n /**\n * Allow the HTTP call to be executed anonymously, when no token is available.\n *\n * When omitted (or set to false), calls that match the configuration will fail when no token is available.\n */\n allowAnonymous?: boolean;\n}\n\n/**\n * Configuration for the authentication service\n */\nexport interface AuthConfig extends Auth0ClientOptions {\n /**\n * By default, if the page URL has code and state parameters, the SDK will assume they are for\n * an Auth0 application and attempt to exchange the code for a token.\n * In some cases the code might be for something else (e.g. another OAuth SDK). In these\n * instances you can instruct the client to ignore them by setting `skipRedirectCallback`.\n *\n * ```js\n * AuthModule.forRoot({\n * skipRedirectCallback: window.location.pathname === '/other-callback'\n * })\n * ```\n *\n * **Note**: In the above example, `/other-callback` is an existing route that will be called\n * by any other OAuth provider with a `code` (or `error` in case when something went wrong) and `state`.\n *\n */\n skipRedirectCallback?: boolean;\n\n /**\n * Configuration for the built-in Http Interceptor, used for\n * automatically attaching access tokens.\n */\n httpInterceptor?: HttpInterceptorConfig;\n\n /**\n * Path in your application to redirect to when the Authorization server\n * returns an error. Defaults to `/`\n */\n errorPath?: string;\n}\n\n/**\n * Angular specific state to be stored before redirect\n */\nexport interface AppState {\n /**\n * Target path the app gets routed to after\n * handling the callback from Auth0 (defaults to '/')\n */\n target?: string;\n\n /**\n * Any custom parameter to be stored in appState\n */\n [key: string]: any;\n}\n\n/**\n * Injection token for accessing configuration.\n *\n * @usageNotes\n *\n * Use the `Inject` decorator to access the configuration from a service or component:\n *\n * ```\n * class MyService(@Inject(AuthConfigService) config: AuthConfig) {}\n * ```\n */\nexport const AuthConfigService = new InjectionToken<AuthConfig>(\n 'auth0-angular.config'\n);\n\n/**\n * Gets and sets configuration for the internal Auth0 client. This can be\n * used to provide configuration outside of using AuthModule.forRoot, i.e. from\n * a factory provided by APP_INITIALIZER.\n *\n * @usage\n *\n * ```js\n * // app.module.ts\n * // ---------------------------\n * import { AuthModule, AuthClientConfig } from '@auth0/auth0-angular';\n *\n * // Provide an initializer function that returns a Promise\n * function configInitializer(\n * http: HttpClient,\n * config: AuthClientConfig\n * ) {\n * return () =>\n * http\n * .get('/config')\n * .toPromise()\n * .then((loadedConfig: any) => config.set(loadedConfig)); // Set the config that was loaded asynchronously here\n * }\n *\n * // Provide APP_INITIALIZER with this function. Note that there is no config passed to AuthModule.forRoot\n * imports: [\n * // other imports..\n *\n * HttpClientModule,\n * AuthModule.forRoot(), //<- don't pass any config here\n * ],\n * providers: [\n * {\n * provide: APP_INITIALIZER,\n * useFactory: configInitializer, // <- pass your initializer function here\n * deps: [HttpClient, AuthClientConfig],\n * multi: true,\n * },\n * ],\n * ```\n *\n */\n@Injectable({ providedIn: 'root' })\nexport class AuthClientConfig {\n private config?: AuthConfig;\n\n constructor(@Optional() @Inject(AuthConfigService) config?: AuthConfig) {\n if (config) {\n this.set(config);\n }\n }\n\n /**\n * Sets configuration to be read by other consumers of the service (see usage notes)\n *\n * @param config The configuration to set\n */\n set(config: AuthConfig): void {\n this.config = config;\n }\n\n /**\n * Gets the config that has been set by other consumers of the service\n */\n get(): AuthConfig {\n return this.config as AuthConfig;\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Location } from '@angular/common';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AbstractNavigator {\n private readonly router?: Router;\n\n constructor(private location: Location, injector: Injector) {\n try {\n this.router = injector.get(Router);\n } catch {}\n }\n\n /**\n * Navigates to the specified url. The router will be used if one is available, otherwise it falls back\n * to `window.history.replaceState`.\n *\n * @param url The url to navigate to\n */\n navigateByUrl(url: string): void {\n if (this.router) {\n this.router.navigateByUrl(url);\n\n return;\n }\n\n this.location.replaceState(url);\n }\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { Auth0Client } from '@auth0/auth0-spa-js';\nimport {\n BehaviorSubject,\n defer,\n merge,\n of,\n ReplaySubject,\n Subject,\n} from 'rxjs';\nimport {\n concatMap,\n distinctUntilChanged,\n filter,\n mergeMap,\n scan,\n shareReplay,\n switchMap,\n} from 'rxjs/operators';\nimport { Auth0ClientService } from './auth.client';\n\n/**\n * Tracks the Authentication State for the SDK\n */\n@Injectable({ providedIn: 'root' })\nexport class AuthState {\n private isLoadingSubject$ = new BehaviorSubject<boolean>(true);\n private refresh$ = new Subject<void>();\n private accessToken$ = new ReplaySubject<string>(1);\n private errorSubject$ = new ReplaySubject<Error>(1);\n\n /**\n * Emits boolean values indicating the loading state of the SDK.\n */\n public readonly isLoading$ = this.isLoadingSubject$.asObservable();\n\n /**\n * Trigger used to pull User information from the Auth0Client.\n * Triggers when the access token has changed.\n */\n private accessTokenTrigger$ = this.accessToken$.pipe(\n scan(\n (\n acc: { current: string | null; previous: string | null },\n current: string | null\n ) => ({\n previous: acc.current,\n current,\n }),\n { current: null, previous: null }\n ),\n filter(({ previous, current }) => previous !== current)\n );\n\n /**\n * Trigger used to pull User information from the Auth0Client.\n * Triggers when an event occurs that needs to retrigger the User Profile information.\n * Events: Login, Access Token change and Logout\n */\n private readonly isAuthenticatedTrigger$ = this.isLoading$.pipe(\n filter((loading) => !loading),\n distinctUntilChanged(),\n switchMap(() =>\n // To track the value of isAuthenticated over time, we need to merge:\n // - the current value\n // - the value whenever the access token changes. (this should always be true of there is an access token\n // but it is safer to pass this through this.auth0Client.isAuthenticated() nevertheless)\n // - the value whenever refreshState$ emits\n merge(\n defer(() => this.auth0Client.isAuthenticated()),\n this.accessTokenTrigger$.pipe(\n mergeMap(() => this.auth0Client.isAuthenticated())\n ),\n this.refresh$.pipe(mergeMap(() => this.auth0Client.isAuthenticated()))\n )\n )\n );\n\n /**\n * Emits boolean values indicating the authentication state of the user. If `true`, it means a user has authenticated.\n * This depends on the value of `isLoading$`, so there is no need to manually check the loading state of the SDK.\n */\n readonly isAuthenticated$ = this.isAuthenticatedTrigger$.pipe(\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n /**\n * Emits details about the authenticated user, or null if not authenticated.\n */\n readonly user$ = this.isAuthenticatedTrigger$.pipe(\n concatMap((authenticated) =>\n authenticated ? this.auth0Client.getUser() : of(null)\n ),\n distinctUntilChanged()\n );\n\n /**\n * Emits ID token claims when authenticated, or null if not authenticated.\n */\n readonly idTokenClaims$ = this.isAuthenticatedTrigger$.pipe(\n concatMap((authenticated) =>\n authenticated ? this.auth0Client.getIdTokenClaims() : of(null)\n )\n );\n\n /**\n * Emits errors that occur during login, or when checking for an active session on startup.\n */\n public readonly error$ = this.errorSubject$.asObservable();\n\n constructor(@Inject(Auth0ClientService) private auth0Client: Auth0Client) {}\n\n /**\n * Update the isLoading state using the provided value\n *\n * @param isLoading The new value for isLoading\n */\n public setIsLoading(isLoading: boolean): void {\n this.isLoadingSubject$.next(isLoading);\n }\n\n /**\n * Refresh the state to ensure the `isAuthenticated`, `user$` and `idTokenClaims$`\n * reflect the most up-to-date values from Auth0Client.\n */\n public refresh(): void {\n this.refresh$.next();\n }\n\n /**\n * Update the access token, doing so will also refresh the state.\n *\n * @param accessToken The new Access Token\n */\n public setAccessToken(accessToken: string): void {\n this.accessToken$.next(accessToken);\n }\n\n /**\n * Emits the error in the `error$` observable.\n *\n * @param error The new error\n */\n public setError(error: any): void {\n this.errorSubject$.next(error);\n }\n}\n","import { Injectable, Inject, OnDestroy } from '@angular/core';\n\nimport {\n Auth0Client,\n PopupLoginOptions,\n PopupConfigOptions,\n GetTokenSilentlyOptions,\n GetTokenWithPopupOptions,\n RedirectLoginResult,\n GetTokenSilentlyVerboseResponse,\n} from '@auth0/auth0-spa-js';\n\nimport {\n of,\n from,\n Subject,\n Observable,\n iif,\n defer,\n ReplaySubject,\n throwError,\n} from 'rxjs';\n\nimport {\n concatMap,\n tap,\n map,\n takeUntil,\n catchError,\n switchMap,\n withLatestFrom,\n} from 'rxjs/operators';\n\nimport { Auth0ClientService } from './auth.client';\nimport { AbstractNavigator } from './abstract-navigator';\nimport { AuthClientConfig, AppState } from './auth.config';\nimport { AuthState } from './auth.state';\nimport { LogoutOptions, RedirectLoginOptions } from './interfaces';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthService<TAppState extends AppState = AppState>\n implements OnDestroy\n{\n private appStateSubject$ = new ReplaySubject<TAppState>(1);\n\n // https://stackoverflow.com/a/41177163\n private ngUnsubscribe$ = new Subject<void>();\n /**\n * Emits boolean values indicating the loading state of the SDK.\n */\n readonly isLoading$ = this.authState.isLoading$;\n\n /**\n * Emits boolean values indicating the authentication state of the user. If `true`, it means a user has authenticated.\n * This depends on the value of `isLoading$`, so there is no need to manually check the loading state of the SDK.\n */\n readonly isAuthenticated$ = this.authState.isAuthenticated$;\n\n /**\n * Emits details about the authenticated user, or null if not authenticated.\n */\n readonly user$ = this.authState.user$;\n\n /**\n * Emits ID token claims when authenticated, or null if not authenticated.\n */\n readonly idTokenClaims$ = this.authState.idTokenClaims$;\n\n /**\n * Emits errors that occur during login, or when checking for an active session on startup.\n */\n readonly error$ = this.authState.error$;\n\n /**\n * Emits the value (if any) that was passed to the `loginWithRedirect` method call\n * but only **after** `handleRedirectCallback` is first called\n */\n readonly appState$ = this.appStateSubject$.asObservable();\n\n constructor(\n @Inject(Auth0ClientService) private auth0Client: Auth0Client,\n private configFactory: AuthClientConfig,\n private navigator: AbstractNavigator,\n private authState: AuthState\n ) {\n const checkSessionOrCallback$ = (isCallback: boolean) =>\n iif(\n () => isCallback,\n this.handleRedirectCallback(),\n defer(() => this.auth0Client.checkSession())\n );\n\n this.shouldHandleCallback()\n .pipe(\n switchMap((isCallback) =>\n checkSessionOrCallback$(isCallback).pipe(\n catchError((error) => {\n const config = this.configFactory.get();\n this.navigator.navigateByUrl(config.errorPath || '/');\n this.authState.setError(error);\n return of(undefined);\n })\n )\n ),\n tap(() => {\n this.authState.setIsLoading(false);\n }),\n takeUntil(this.ngUnsubscribe$)\n )\n .subscribe();\n }\n\n /**\n * Called when the service is destroyed\n */\n ngOnDestroy(): void {\n // https://stackoverflow.com/a/41177163\n this.ngUnsubscribe$.next();\n this.ngUnsubscribe$.complete();\n }\n\n /**\n * ```js\n * loginWithRedirect(options);\n * ```\n *\n * Performs a redirect to `/authorize` using the parameters\n * provided as arguments. Random and secure `state` and `nonce`\n * parameters will be auto-generated.\n *\n * @param options The login options\n */\n loginWithRedirect(\n options?: RedirectLoginOptions<TAppState>\n ): Observable<void> {\n return from(this.auth0Client.loginWithRedirect(options));\n }\n\n /**\n * ```js\n * await loginWithPopup(options);\n * ```\n *\n * Opens a popup with the `/authorize` URL using the parameters\n * provided as arguments. Random and secure `state` and `nonce`\n * parameters will be auto-generated. If the response is successful,\n * results will be valid according to their expiration times.\n *\n * IMPORTANT: This method has to be called from an event handler\n * that was started by the user like a button click, for example,\n * otherwise the popup will be blocked in most browsers.\n *\n * @param options The login options\n * @param config Configuration for the popup window\n */\n loginWithPopup(\n options?: PopupLoginOptions,\n config?: PopupConfigOptions\n ): Observable<void> {\n return from(\n this.auth0Client.loginWithPopup(options, config).then(() => {\n this.authState.refresh();\n })\n );\n }\n\n /**\n * ```js\n * logout();\n * ```\n *\n * Clears the application session and performs a redirect to `/v2/logout`, using\n * the parameters provided as arguments, to clear the Auth0 session.\n * If the `federated` option is specified it also clears the Identity Provider session.\n * If the `openUrl` option is set to false, it only clears the application session.\n * It is invalid to set both the `federated` to true and `openUrl` to `false`,\n * and an error will be thrown if you do.\n * [Read more about how Logout works at Auth0](https://auth0.com/docs/logout).\n *\n * @param options The logout options\n */\n logout(options?: LogoutOptions): Observable<void> {\n return from(\n this.auth0Client.logout(options).then(() => {\n if (options?.openUrl === false || options?.openUrl) {\n this.authState.refresh();\n }\n })\n );\n }\n\n /**\n * Fetches a new access token and returns the response from the /oauth/token endpoint, omitting the refresh token.\n *\n * @param options The options for configuring the token fetch.\n */\n getAccessTokenSilently(\n options: GetTokenSilentlyOptions & { detailedResponse: true }\n ): Observable<GetTokenSilentlyVerboseResponse>;\n\n /**\n * Fetches a new access token and returns it.\n *\n * @param options The options for configuring the token fetch.\n */\n getAccessTokenSilently(options?: GetTokenSilentlyOptions): Observable<string>;\n\n /**\n * ```js\n * getAccessTokenSilently(options).subscribe(token => ...)\n * ```\n *\n * If there's a valid token stored, return it. Otherwise, opens an\n * iframe with the `/authorize` URL using the parameters provided\n * as arguments. Random and secure `state` and `nonce` parameters\n * will be auto-generated. If the response is successful, results\n * will be valid according to their expiration times.\n *\n * If refresh tokens are used, the token endpoint is called directly with the\n * 'refresh_token' grant. If no refresh token is available to make this call,\n * the SDK falls back to using an iframe to the '/authorize' URL.\n *\n * This method may use a web worker to perform the token call if the in-memory\n * cache is used.\n *\n * If an `audience` value is given to this function, the SDK always falls\n * back to using an iframe to make the token exchange.\n *\n * Note that in all cases, falling back to an iframe requires access to\n * the `auth0` cookie, and thus will not work in browsers that block third-party\n * cookies by default (Safari, Brave, etc).\n *\n * @param options The options for configuring the token fetch.\n */\n getAccessTokenSilently(\n options: GetTokenSilentlyOptions = {}\n ): Observable<string | GetTokenSilentlyVerboseResponse> {\n return of(this.auth0Client).pipe(\n concatMap((client) =>\n options.detailedResponse === true\n ? client.getTokenSilently({ ...options, detailedResponse: true })\n : client.getTokenSilently(options)\n ),\n tap((token) => {\n if (token) {\n this.authState.setAccessToken(\n typeof token === 'string' ? token : token.access_token\n );\n }\n }),\n catchError((error) => {\n this.authState.setError(error);\n this.authState.refresh();\n return throwError(error);\n })\n );\n }\n\n /**\n * ```js\n * getTokenWithPopup(options).subscribe(token => ...)\n * ```\n *\n * Get an access token interactively.\n *\n * Opens a popup with the `/authorize` URL using the parameters\n * provided as arguments. Random and secure `state` and `nonce`\n * parameters will be auto-generated. If the response is successful,\n * results will be valid according to their expiration times.\n */\n getAccessTokenWithPopup(\n options?: GetTokenWithPopupOptions\n ): Observable<string | undefined> {\n return of(this.auth0Client).pipe(\n concatMap((client) => client.getTokenWithPopup(options)),\n tap((token) => {\n if (token) {\n this.authState.setAccessToken(token);\n }\n }),\n catchError((error) => {\n this.authState.setError(error);\n this.authState.refresh();\n return throwError(error);\n })\n );\n }\n\n /**\n * ```js\n * handleRedirectCallback(url).subscribe(result => ...)\n * ```\n *\n * After the browser redirects back to the callback page,\n * call `handleRedirectCallback` to handle success and error\n * responses from Auth0. If the response is successful, results\n * will be valid according to their expiration times.\n *\n * Calling this method also refreshes the authentication and user states.\n *\n * @param url The URL to that should be used to retrieve the `state` and `code` values. Defaults to `window.location.href` if not given.\n */\n handleRedirectCallback(\n url?: string\n ): Observable<RedirectLoginResult<TAppState>> {\n return defer(() =>\n this.auth0Client.handleRedirectCallback<TAppState>(url)\n ).pipe(\n withLatestFrom(this.authState.isLoading$),\n tap(([result, isLoading]) => {\n if (!isLoading) {\n this.authState.refresh();\n }\n const appState = result?.appState;\n const target = appState?.target ?? '/';\n\n if (appState) {\n this.appStateSubject$.next(appState);\n }\n\n this.navigator.navigateByUrl(target);\n }),\n map(([result]) => result)\n );\n }\n\n private shouldHandleCallback(): Observable<boolean> {\n return of(location.search).pipe(\n map((search) => {\n const searchParams = new URLSearchParams(search);\n return (\n (searchParams.has('code') || searchParams.has('error')) &&\n searchParams.has('state') &&\n !this.configFactory.get().skipRedirectCallback\n );\n })\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n RouterStateSnapshot,\n Route,\n UrlSegment,\n} from '@angular/router';\nimport { Observable, of } from 'rxjs';\nimport { take, switchMap, map } from 'rxjs/operators';\nimport { AuthService } from './auth.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthGuard {\n constructor(private auth: AuthService) {}\n\n canLoad(route: Route, segments: UrlSegment[]): Observable<boolean> {\n return this.auth.isAuthenticated$.pipe(take(1));\n }\n\n canActivate(\n next: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean> {\n return this.redirectIfUnauthenticated(state);\n }\n\n canActivateChild(\n childRoute: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean> {\n return this.redirectIfUnauthenticated(state);\n }\n\n private redirectIfUnauthenticated(\n state: RouterStateSnapshot\n ): Observable<boolean> {\n return this.auth.isAuthenticated$.pipe(\n switchMap((loggedIn) => {\n if (!loggedIn) {\n return this.auth\n .loginWithRedirect({\n appState: { target: state.url },\n })\n .pipe(map(() => false));\n }\n return of(true);\n })\n );\n }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { AuthService } from './auth.service';\nimport { AuthConfig, AuthConfigService, AuthClientConfig } from './auth.config';\nimport { Auth0ClientService, Auth0ClientFactory } from './auth.client';\nimport { AuthGuard } from './auth.guard';\n\n@NgModule()\nexport class AuthModule {\n /**\n * Initialize the authentication module system. Configuration can either be specified here,\n * or by calling AuthClientConfig.set (perhaps from an APP_INITIALIZER factory function).\n *\n * @param config The optional configuration for the SDK.\n */\n static forRoot(config?: AuthConfig): ModuleWithProviders<AuthModule> {\n return {\n ngModule: AuthModule,\n providers: [\n AuthService,\n AuthGuard,\n {\n provide: AuthConfigService,\n useValue: config,\n },\n {\n provide: Auth0ClientService,\n useFactory: Auth0ClientFactory.createClient,\n deps: [AuthClientConfig],\n },\n ],\n };\n }\n}\n","import {\n HttpInterceptor,\n HttpRequest,\n HttpHandler,\n HttpEvent,\n} from '@angular/common/http';\n\nimport { Observable, from, of, iif, throwError } from 'rxjs';\nimport { Inject, Injectable } from '@angular/core';\n\nimport {\n ApiRouteDefinition,\n isHttpInterceptorRouteConfig,\n AuthClientConfig,\n HttpInterceptorConfig,\n} from './auth.config';\n\nimport {\n switchMap,\n first,\n concatMap,\n catchError,\n tap,\n filter,\n mergeMap,\n mapTo,\n pluck,\n} from 'rxjs/operators';\nimport { Auth0Client, GetTokenSilentlyOptions } from '@auth0/auth0-spa-js';\nimport { Auth0ClientService } from './auth.client';\nimport { AuthState } from './auth.state';\nimport { AuthService } from './auth.service';\n\nconst waitUntil =\n <TSignal>(signal$: Observable<TSignal>) =>\n <TSource>(source$: Observable<TSource>) =>\n source$.pipe(mergeMap((value) => signal$.pipe(first(), mapTo(value))));\n\n@Injectable()\nexport class AuthHttpInterceptor implements HttpInterceptor {\n constructor(\n private configFactory: AuthClientConfig,\n @Inject(Auth0ClientService) private auth0Client: Auth0Client,\n private authState: AuthState,\n private authService: AuthService\n ) {}\n\n intercept(\n req: HttpRequest<any>,\n next: HttpHandler\n ): Observable<HttpEvent<any>> {\n const config = this.configFactory.get();\n if (!config.httpInterceptor?.allowedList) {\n return next.handle(req);\n }\n\n const isLoaded$ = this.authService.isLoading$.pipe(\n filter((isLoading) => !isLoading)\n );\n\n return this.findMatchingRoute(req, config.httpInterceptor).pipe(\n concatMap((route) =>\n iif(\n // Check if a route was matched\n () => route !== null,\n // If we have a matching route, call getTokenSilently and attach the token to the\n // outgoing request\n of(route).pipe(\n waitUntil(isLoaded$),\n pluck('tokenOptions'),\n concatMap<GetTokenSilentlyOptions, Observable<string>>((options) =>\n this.getAccessTokenSilently(options).pipe(\n catchError((err) => {\n if (this.allowAnonymous(route, err)) {\n return of('');\n }\n\n this.authState.setError(err);\n return throwError(err);\n })\n )\n ),\n switchMap((token: string) => {\n // Clone the request and attach the bearer token\n const clone = token\n ? req.clone({\n headers: req.headers.set(\n 'Authorization',\n `Bearer ${token}`\n ),\n })\n : req;\n\n return next.handle(clone);\n })\n ),\n // If the URI being called was not found in our httpInterceptor config, simply\n // pass the request through without attaching a token\n next.handle(req)\n )\n )\n );\n }\n\n /**\n * Duplicate of AuthService.getAccessTokenSilently, but with a slightly different error handling.\n * Only used internally in the interceptor.\n *\n * @param options The options for configuring the token fetch.\n */\n private getAccessTokenSilently(\n options?: GetTokenSilentlyOptions\n ): Observable<string> {\n return of(this.auth0Client).pipe(\n concatMap((client) => client.getTokenSilently(options)),\n tap((token) => this.authState.setAccessToken(token)),\n catchError((error) => {\n this.authState.refresh();\n return throwError(error);\n })\n );\n }\n\n /**\n * Strips the query and fragment from the given uri\n *\n * @param uri The uri to remove the query and fragment from\n */\n private stripQueryFrom(uri: string): string {\n if (uri.indexOf('?') > -1) {\n uri = uri.substr(0, uri.indexOf('?'));\n }\n\n if (uri.indexOf('#') > -1) {\n uri = uri.substr(0, uri.indexOf('#'));\n }\n\n return uri;\n }\n\n /**\n * Determines whether the specified route can have an access token attached to it, based on matching the HTTP request against\n * the interceptor route configuration.\n *\n * @param route The route to test\n * @param request The HTTP request\n */\n private canAttachToken(\n route: ApiRouteDefinition,\n request: HttpRequest<any>\n ): boolean {\n const testPrimitive = (value: string | undefined): boolean => {\n if (!value) {\n return false;\n }\n\n const requestPath = this.stripQueryFrom(request.url);\n\n if (value === requestPath) {\n return true;\n }\n\n // If the URL ends with an asterisk, match using startsWith.\n return (\n value.indexOf('*') === value.length - 1 &&\n request.url.startsWith(value.substr(0, value.length - 1))\n );\n };\n\n if (isHttpInterceptorRouteConfig(route)) {\n if (route.httpMethod && route.httpMethod !== request.method) {\n return false;\n }\n\n /* istanbul ignore if */\n if (!route.uri && !route.uriMatcher) {\n console.warn(\n 'Either a uri or uriMatcher is required when configuring the HTTP interceptor.'\n );\n }\n\n return route.uriMatcher\n ? route.uriMatcher(request.url)\n : testPrimitive(route.uri);\n }\n\n return testPrimitive(route);\n }\n\n /**\n * Tries to match a route from the SDK configuration to the HTTP request.\n * If a match is found, the route configuration is returned.\n *\n * @param request The Http request\n * @param config HttpInterceptorConfig\n */\n private findMatchingRoute(\n request: HttpRequest<any>,\n config: HttpInterceptorConfig\n ): Observable<ApiRouteDefinition | null> {\n return from(config.allowedList).pipe(\n first((route) => this.canAttachToken(route, request), null)\n );\n }\n\n private allowAnonymous(route: ApiRouteDefinition | null, err: any): boolean {\n return (\n !!route &&\n isHttpInterceptorRouteConfig(route) &&\n !!route.allowAnonymous &&\n ['login_required', 'consent_required', 'missing_refresh_token'].includes(\n err.error\n )\n );\n }\n}\n","import { Provider } from '@angular/core';\nimport { Auth0ClientService, Auth0ClientFactory } from './auth.client';\nimport { AuthConfig, AuthConfigService, AuthClientConfig } from './auth.config';\nimport { AuthGuard } from './auth.guard';\nimport { AuthHttpInterceptor } from './auth.interceptor';\nimport { AuthService } from './auth.service';\n\n/**\n * Initialize the authentication system. Configuration can either be specified here,\n * or by calling AuthClientConfig.set (perhaps from an APP_INITIALIZER factory function).\n *\n * Note: Should only be used as of Angular 15, and should not be added to a component's providers.\n *\n * @param config The optional configuration for the SDK.\n *\n * @example\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideAuth0(),\n * ],\n * });\n */\nexport function provideAuth0(config?: AuthConfig): Provider[] {\n return [\n AuthService,\n AuthHttpInterceptor,\n AuthGuard,\n {\n provide: AuthConfigService,\n useValue: config,\n },\n {\n provide: Auth0ClientService,\n useFactory: Auth0ClientFactory.createClient,\n deps: [AuthClientConfig],\n },\n ];\n}\n","import { HttpEvent, HttpRequest } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { AuthGuard } from './auth.guard';\nimport { AuthHttpInterceptor } from './auth.interceptor';\n\n/**\n * Functional AuthGuard to ensure routes can only be accessed when authenticated.\n *\n * Note: Should only be used as of Angular 15\n *\n * @param route Contains the information about a route associated with a component loaded in an outlet at a particular moment in time.\n * @param state Represents the state of the router at a moment in time.\n * @returns An Observable, indicating if the route can be accessed or not\n */\nexport const authGuardFn = (\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n) => inject(AuthGuard).canActivate(route, state);\n\n/**\n * Functional AuthHttpInterceptor to include the access token in matching requests.\n *\n * Note: Should only be used as of Angular 15\n *\n * @param req An outgoing HTTP request with an optional typed body.\n * @param handle Represents the next interceptor in an interceptor chain, or the real backend if there are no\n * further interceptors.\n * @returns An Observable representing the intercepted HttpRequest\n */\nexport const authHttpInterceptorFn = (\n req: HttpRequest<any>,\n handle: (req: HttpRequest<unknown>) => Observable<HttpEvent<unknown>>\n) => inject(AuthHttpInterceptor).intercept(req, { handle });\n","/*\n * Public API Surface of auth0-angular\n */\n\nexport * from './lib/auth.service';\nexport * from './lib/auth.module';\nexport * from './lib/auth.guard';\nexport * from './lib/auth.interceptor';\nexport * from './lib/auth.config';\nexport * from './lib/auth.client';\nexport * from './lib/auth.state';\nexport * from './lib/interfaces';\nexport * from './lib/provide';\nexport * from './lib/functional';\nexport * from './lib/abstract-navigator';\n\nexport {\n AuthorizationParams,\n PopupLoginOptions,\n PopupConfigOptions,\n GetTokenWithPopupOptions,\n GetTokenSilentlyOptions,\n ICache,\n Cacheable,\n LocalStorageCache,\n InMemoryCache,\n IdToken,\n User,\n GenericError,\n TimeoutError,\n MfaRequiredError,\n PopupTimeoutError,\n AuthenticationError,\n PopupCancelledError,\n MissingRefreshTokenError,\n} from '@auth0/auth0-spa-js';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.AuthClientConfig","i2.AbstractNavigator","i3.AuthState","i1.AuthService","i2.AuthState","i3.AuthService"],"mappings":";;;;;;;;;;AAAA,gBAAe,EAAE,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,OAAO,EAAE;;MCKpD,kBAAkB,CAAA;IAC7B,OAAO,YAAY,CAAC,aAA+B,EAAA;AACjD,QAAA,MAAM,MAAM,GAAG,aAAa,CAAC,GAAG,EAAE,CAAC;QAEnC,IAAI,CAAC,MAAM,EAAE;AACX,YAAA,MAAM,IAAI,KAAK,CACb,mGAAmG,CACpG,CAAC;SACH;QAED,OAAO,IAAI,WAAW,CAAC;AACrB,YAAA,GAAG,MAAM;AACT,YAAA,WAAW,EAAE;gBACX,IAAI,EAAE,SAAS,CAAC,IAAI;gBACpB,OAAO,EAAE,SAAS,CAAC,OAAO;AAC1B,gBAAA,GAAG,EAAE;oBACH,cAAc,EAAE,OAAO,CAAC,IAAI;AAC7B,iBAAA;AACF,aAAA;AACF,SAAA,CAAC,CAAC;KACJ;AACF,CAAA;MAEY,kBAAkB,GAAG,IAAI,cAAc,CAClD,cAAc;;ACAhB;;;;AAIG;AACG,SAAU,4BAA4B,CAC1C,GAAuB,EAAA;AAEvB,IAAA,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC;AACjC,CAAC;AAoHD;;;;;;;;;;AAUG;MACU,iBAAiB,GAAG,IAAI,cAAc,CACjD,sBAAsB,EACtB;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCG;MAEU,gBAAgB,CAAA;AAG3B,IAAA,WAAA,CAAmD,MAAmB,EAAA;QACpE,IAAI,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AAS,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE;AAEjD;;;;;;;;;AASG;AACU,MAAA,qBAAqB,GAAG,CACnC,GAAqB,EACrB,MAAqE,KAClE,MAAM,CAAC,mBAAmB,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE;;AClC1D;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"auth0-auth0-angular.mjs","sources":["../../../projects/auth0-angular/src/useragent.ts","../../../projects/auth0-angular/src/lib/auth.client.ts","../../../projects/auth0-angular/src/lib/auth.config.ts","../../../projects/auth0-angular/src/lib/abstract-navigator.ts","../../../projects/auth0-angular/src/lib/auth.state.ts","../../../projects/auth0-angular/src/lib/auth.service.ts","../../../projects/auth0-angular/src/lib/auth.guard.ts","../../../projects/auth0-angular/src/lib/auth.module.ts","../../../projects/auth0-angular/src/lib/auth.interceptor.ts","../../../projects/auth0-angular/src/lib/provide.ts","../../../projects/auth0-angular/src/lib/functional.ts","../../../projects/auth0-angular/src/public-api.ts","../../../projects/auth0-angular/src/auth0-auth0-angular.ts"],"sourcesContent":["export default { name: '@auth0/auth0-angular', version: '2.4.1' };\n","import { InjectionToken, VERSION } from '@angular/core';\nimport { Auth0Client } from '@auth0/auth0-spa-js';\nimport { AuthClientConfig } from './auth.config';\nimport useragent from '../useragent';\n\nexport class Auth0ClientFactory {\n static createClient(configFactory: AuthClientConfig): Auth0Client {\n const config = configFactory.get();\n\n if (!config) {\n throw new Error(\n 'Configuration must be specified either through AuthModule.forRoot or through AuthClientConfig.set'\n );\n }\n\n return new Auth0Client({\n ...config,\n auth0Client: {\n name: useragent.name,\n version: useragent.version,\n env: {\n 'angular/core': VERSION.full,\n },\n },\n });\n }\n}\n\nexport const Auth0ClientService = new InjectionToken<Auth0Client>(\n 'auth0.client'\n);\n","import {\n Auth0ClientOptions,\n CacheLocation,\n GetTokenSilentlyOptions,\n ICache,\n} from '@auth0/auth0-spa-js';\n\nimport { InjectionToken, Injectable, Optional, Inject } from '@angular/core';\n\n/**\n * Defines a common set of HTTP methods.\n */\nexport const enum HttpMethod {\n Get = 'GET',\n Post = 'POST',\n Put = 'PUT',\n Patch = 'PATCH',\n Delete = 'DELETE',\n Head = 'HEAD',\n}\n\n/**\n * Defines the type for a route config entry. Can either be:\n *\n * - an object of type HttpInterceptorRouteConfig\n * - a string\n */\nexport type ApiRouteDefinition = HttpInterceptorRouteConfig | string;\n\n/**\n * A custom type guard to help identify route definitions that are actually HttpInterceptorRouteConfig types.\n *\n * @param def The route definition type\n */\nexport function isHttpInterceptorRouteConfig(\n def: ApiRouteDefinition\n): def is HttpInterceptorRouteConfig {\n return typeof def !== 'string';\n}\n\n/**\n * Configuration for the HttpInterceptor\n */\nexport interface HttpInterceptorConfig {\n allowedList: ApiRouteDefinition[];\n}\n\n/**\n * Configuration for a single interceptor route\n */\nexport interface HttpInterceptorRouteConfig {\n /**\n * The URL to test, by supplying the URL to match.\n * If `test` is a match for the current request path from the HTTP client, then\n * an access token is attached to the request in the\n * [\"Authorization\" header](https://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-20#section-2.1).\n *\n * If the test does not pass, the request proceeds without the access token attached.\n *\n * A wildcard character can be used to match only the start of the URL.\n *\n * @usagenotes\n *\n * '/api' - exactly match the route /api\n * '/api/*' - match any route that starts with /api/\n */\n uri?: string;\n\n /**\n * A function that will be called with the HttpRequest.url value, allowing you to do\n * any kind of flexible matching.\n *\n * If this function returns true, then\n * an access token is attached to the request in the\n * [\"Authorization\" header](https://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-20#section-2.1).\n *\n * If it returns false, the request proceeds without the access token attached.\n */\n uriMatcher?: (uri: string) => boolean;\n\n /**\n * The options that are passed to the SDK when retrieving the\n * access token to attach to the outgoing request.\n */\n tokenOptions?: GetTokenSilentlyOptions;\n\n /**\n * The HTTP method to match on. If specified, the HTTP method of\n * the outgoing request will be checked against this. If there is no match, the\n * Authorization header is not attached.\n *\n * The HTTP method name is case-sensitive.\n */\n httpMethod?: HttpMethod | string;\n\n /**\n * Allow the HTTP call to be executed anonymously, when no token is available.\n *\n * When omitted (or set to false), calls that match the configuration will fail when no token is available.\n */\n allowAnonymous?: boolean;\n}\n\n/**\n * Configuration for the authentication service\n */\nexport interface AuthConfig extends Auth0ClientOptions {\n /**\n * By default, if the page URL has code and state parameters, the SDK will assume they are for\n * an Auth0 application and attempt to exchange the code for a token.\n * In some cases the code might be for something else (e.g. another OAuth SDK). In these\n * instances you can instruct the client to ignore them by setting `skipRedirectCallback`.\n *\n * ```js\n * AuthModule.forRoot({\n * skipRedirectCallback: window.location.pathname === '/other-callback'\n * })\n * ```\n *\n * **Note**: In the above example, `/other-callback` is an existing route that will be called\n * by any other OAuth provider with a `code` (or `error` in case when something went wrong) and `state`.\n *\n */\n skipRedirectCallback?: boolean;\n\n /**\n * Configuration for the built-in Http Interceptor, used for\n * automatically attaching access tokens.\n */\n httpInterceptor?: HttpInterceptorConfig;\n\n /**\n * Path in your application to redirect to when the Authorization server\n * returns an error. Defaults to `/`\n */\n errorPath?: string;\n}\n\n/**\n * Angular specific state to be stored before redirect\n */\nexport interface AppState {\n /**\n * Target path the app gets routed to after\n * handling the callback from Auth0 (defaults to '/')\n */\n target?: string;\n\n /**\n * Any custom parameter to be stored in appState\n */\n [key: string]: any;\n}\n\n/**\n * Injection token for accessing configuration.\n *\n * @usageNotes\n *\n * Use the `Inject` decorator to access the configuration from a service or component:\n *\n * ```\n * class MyService(@Inject(AuthConfigService) config: AuthConfig) {}\n * ```\n */\nexport const AuthConfigService = new InjectionToken<AuthConfig>(\n 'auth0-angular.config'\n);\n\n/**\n * Gets and sets configuration for the internal Auth0 client. This can be\n * used to provide configuration outside of using AuthModule.forRoot, i.e. from\n * a factory provided by APP_INITIALIZER.\n *\n * @usage\n *\n * ```js\n * // app.module.ts\n * // ---------------------------\n * import { AuthModule, AuthClientConfig } from '@auth0/auth0-angular';\n *\n * // Provide an initializer function that returns a Promise\n * function configInitializer(\n * http: HttpClient,\n * config: AuthClientConfig\n * ) {\n * return () =>\n * http\n * .get('/config')\n * .toPromise()\n * .then((loadedConfig: any) => config.set(loadedConfig)); // Set the config that was loaded asynchronously here\n * }\n *\n * // Provide APP_INITIALIZER with this function. Note that there is no config passed to AuthModule.forRoot\n * imports: [\n * // other imports..\n *\n * HttpClientModule,\n * AuthModule.forRoot(), //<- don't pass any config here\n * ],\n * providers: [\n * {\n * provide: APP_INITIALIZER,\n * useFactory: configInitializer, // <- pass your initializer function here\n * deps: [HttpClient, AuthClientConfig],\n * multi: true,\n * },\n * ],\n * ```\n *\n */\n@Injectable({ providedIn: 'root' })\nexport class AuthClientConfig {\n private config?: AuthConfig;\n\n constructor(@Optional() @Inject(AuthConfigService) config?: AuthConfig) {\n if (config) {\n this.set(config);\n }\n }\n\n /**\n * Sets configuration to be read by other consumers of the service (see usage notes)\n *\n * @param config The configuration to set\n */\n set(config: AuthConfig): void {\n this.config = config;\n }\n\n /**\n * Gets the config that has been set by other consumers of the service\n */\n get(): AuthConfig {\n return this.config as AuthConfig;\n }\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Location } from '@angular/common';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AbstractNavigator {\n private readonly router?: Router;\n\n constructor(private location: Location, injector: Injector) {\n try {\n this.router = injector.get(Router);\n } catch {}\n }\n\n /**\n * Navigates to the specified url. The router will be used if one is available, otherwise it falls back\n * to `window.history.replaceState`.\n *\n * @param url The url to navigate to\n */\n navigateByUrl(url: string): void {\n if (this.router) {\n this.router.navigateByUrl(url);\n\n return;\n }\n\n this.location.replaceState(url);\n }\n}\n","import { Inject, Injectable } from '@angular/core';\nimport { Auth0Client } from '@auth0/auth0-spa-js';\nimport {\n BehaviorSubject,\n defer,\n merge,\n of,\n ReplaySubject,\n Subject,\n} from 'rxjs';\nimport {\n concatMap,\n distinctUntilChanged,\n filter,\n mergeMap,\n scan,\n shareReplay,\n switchMap,\n} from 'rxjs/operators';\nimport { Auth0ClientService } from './auth.client';\n\n/**\n * Tracks the Authentication State for the SDK\n */\n@Injectable({ providedIn: 'root' })\nexport class AuthState {\n private isLoadingSubject$ = new BehaviorSubject<boolean>(true);\n private refresh$ = new Subject<void>();\n private accessToken$ = new ReplaySubject<string>(1);\n private errorSubject$ = new ReplaySubject<Error>(1);\n\n /**\n * Emits boolean values indicating the loading state of the SDK.\n */\n public readonly isLoading$ = this.isLoadingSubject$.asObservable();\n\n /**\n * Trigger used to pull User information from the Auth0Client.\n * Triggers when the access token has changed.\n */\n private accessTokenTrigger$ = this.accessToken$.pipe(\n scan(\n (\n acc: { current: string | null; previous: string | null },\n current: string | null\n ) => ({\n previous: acc.current,\n current,\n }),\n { current: null, previous: null }\n ),\n filter(({ previous, current }) => previous !== current)\n );\n\n /**\n * Trigger used to pull User information from the Auth0Client.\n * Triggers when an event occurs that needs to retrigger the User Profile information.\n * Events: Login, Access Token change and Logout\n */\n private readonly isAuthenticatedTrigger$ = this.isLoading$.pipe(\n filter((loading) => !loading),\n distinctUntilChanged(),\n switchMap(() =>\n // To track the value of isAuthenticated over time, we need to merge:\n // - the current value\n // - the value whenever the access token changes. (this should always be true of there is an access token\n // but it is safer to pass this through this.auth0Client.isAuthenticated() nevertheless)\n // - the value whenever refreshState$ emits\n merge(\n defer(() => this.auth0Client.isAuthenticated()),\n this.accessTokenTrigger$.pipe(\n mergeMap(() => this.auth0Client.isAuthenticated())\n ),\n this.refresh$.pipe(mergeMap(() => this.auth0Client.isAuthenticated()))\n )\n )\n );\n\n /**\n * Emits boolean values indicating the authentication state of the user. If `true`, it means a user has authenticated.\n * This depends on the value of `isLoading$`, so there is no need to manually check the loading state of the SDK.\n */\n readonly isAuthenticated$ = this.isAuthenticatedTrigger$.pipe(\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n /**\n * Emits details about the authenticated user, or null if not authenticated.\n */\n readonly user$ = this.isAuthenticatedTrigger$.pipe(\n concatMap((authenticated) =>\n authenticated ? this.auth0Client.getUser() : of(null)\n ),\n distinctUntilChanged()\n );\n\n /**\n * Emits ID token claims when authenticated, or null if not authenticated.\n */\n readonly idTokenClaims$ = this.isAuthenticatedTrigger$.pipe(\n concatMap((authenticated) =>\n authenticated ? this.auth0Client.getIdTokenClaims() : of(null)\n )\n );\n\n /**\n * Emits errors that occur during login, or when checking for an active session on startup.\n */\n public readonly error$ = this.errorSubject$.asObservable();\n\n constructor(@Inject(Auth0ClientService) private auth0Client: Auth0Client) {}\n\n /**\n * Update the isLoading state using the provided value\n *\n * @param isLoading The new value for isLoading\n */\n public setIsLoading(isLoading: boolean): void {\n this.isLoadingSubject$.next(isLoading);\n }\n\n /**\n * Refresh the state to ensure the `isAuthenticated`, `user$` and `idTokenClaims$`\n * reflect the most up-to-date values from Auth0Client.\n */\n public refresh(): void {\n this.refresh$.next();\n }\n\n /**\n * Update the access token, doing so will also refresh the state.\n *\n * @param accessToken The new Access Token\n */\n public setAccessToken(accessToken: string): void {\n this.accessToken$.next(accessToken);\n }\n\n /**\n * Emits the error in the `error$` observable.\n *\n * @param error The new error\n */\n public setError(error: any): void {\n this.errorSubject$.next(error);\n }\n}\n","import { Injectable, Inject, OnDestroy } from '@angular/core';\n\nimport {\n Auth0Client,\n PopupLoginOptions,\n PopupConfigOptions,\n GetTokenSilentlyOptions,\n GetTokenWithPopupOptions,\n RedirectLoginResult,\n GetTokenSilentlyVerboseResponse,\n ConnectAccountRedirectResult,\n CustomFetchMinimalOutput,\n Fetcher,\n FetcherConfig,\n} from '@auth0/auth0-spa-js';\n\nimport {\n of,\n from,\n Subject,\n Observable,\n iif,\n defer,\n ReplaySubject,\n throwError,\n} from 'rxjs';\n\nimport {\n concatMap,\n tap,\n map,\n takeUntil,\n catchError,\n switchMap,\n withLatestFrom,\n} from 'rxjs/operators';\n\nimport { Auth0ClientService } from './auth.client';\nimport { AbstractNavigator } from './abstract-navigator';\nimport { AuthClientConfig, AppState } from './auth.config';\nimport { AuthState } from './auth.state';\nimport { LogoutOptions, RedirectLoginOptions } from './interfaces';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthService<TAppState extends AppState = AppState>\n implements OnDestroy\n{\n private appStateSubject$ = new ReplaySubject<TAppState>(1);\n\n // https://stackoverflow.com/a/41177163\n private ngUnsubscribe$ = new Subject<void>();\n /**\n * Emits boolean values indicating the loading state of the SDK.\n */\n readonly isLoading$ = this.authState.isLoading$;\n\n /**\n * Emits boolean values indicating the authentication state of the user. If `true`, it means a user has authenticated.\n * This depends on the value of `isLoading$`, so there is no need to manually check the loading state of the SDK.\n */\n readonly isAuthenticated$ = this.authState.isAuthenticated$;\n\n /**\n * Emits details about the authenticated user, or null if not authenticated.\n */\n readonly user$ = this.authState.user$;\n\n /**\n * Emits ID token claims when authenticated, or null if not authenticated.\n */\n readonly idTokenClaims$ = this.authState.idTokenClaims$;\n\n /**\n * Emits errors that occur during login, or when checking for an active session on startup.\n */\n readonly error$ = this.authState.error$;\n\n /**\n * Emits the value (if any) that was passed to the `loginWithRedirect` method call\n * but only **after** `handleRedirectCallback` is first called\n */\n readonly appState$ = this.appStateSubject$.asObservable();\n\n constructor(\n @Inject(Auth0ClientService) private auth0Client: Auth0Client,\n private configFactory: AuthClientConfig,\n private navigator: AbstractNavigator,\n private authState: AuthState\n ) {\n const checkSessionOrCallback$ = (isCallback: boolean) =>\n iif(\n () => isCallback,\n this.handleRedirectCallback(),\n defer(() => this.auth0Client.checkSession())\n );\n\n this.shouldHandleCallback()\n .pipe(\n switchMap((isCallback) =>\n checkSessionOrCallback$(isCallback).pipe(\n catchError((error) => {\n const config = this.configFactory.get();\n this.navigator.navigateByUrl(config.errorPath || '/');\n this.authState.setError(error);\n return of(undefined);\n })\n )\n ),\n tap(() => {\n this.authState.setIsLoading(false);\n }),\n takeUntil(this.ngUnsubscribe$)\n )\n .subscribe();\n }\n\n /**\n * Called when the service is destroyed\n */\n ngOnDestroy(): void {\n // https://stackoverflow.com/a/41177163\n this.ngUnsubscribe$.next();\n this.ngUnsubscribe$.complete();\n }\n\n /**\n * ```js\n * loginWithRedirect(options);\n * ```\n *\n * Performs a redirect to `/authorize` using the parameters\n * provided as arguments. Random and secure `state` and `nonce`\n * parameters will be auto-generated.\n *\n * @param options The login options\n */\n loginWithRedirect(\n options?: RedirectLoginOptions<TAppState>\n ): Observable<void> {\n return from(this.auth0Client.loginWithRedirect(options));\n }\n\n /**\n * ```js\n * await loginWithPopup(options);\n * ```\n *\n * Opens a popup with the `/authorize` URL using the parameters\n * provided as arguments. Random and secure `state` and `nonce`\n * parameters will be auto-generated. If the response is successful,\n * results will be valid according to their expiration times.\n *\n * IMPORTANT: This method has to be called from an event handler\n * that was started by the user like a button click, for example,\n * otherwise the popup will be blocked in most browsers.\n *\n * @param options The login options\n * @param config Configuration for the popup window\n */\n loginWithPopup(\n options?: PopupLoginOptions,\n config?: PopupConfigOptions\n ): Observable<void> {\n return from(\n this.auth0Client.loginWithPopup(options, config).then(() => {\n this.authState.refresh();\n })\n );\n }\n\n /**\n * ```js\n * logout();\n * ```\n *\n * Clears the application session and performs a redirect to `/v2/logout`, using\n * the parameters provided as arguments, to clear the Auth0 session.\n * If the `federated` option is specified it also clears the Identity Provider session.\n * If the `openUrl` option is set to false, it only clears the application session.\n * It is invalid to set both the `federated` to true and `openUrl` to `false`,\n * and an error will be thrown if you do.\n * [Read more about how Logout works at Auth0](https://auth0.com/docs/logout).\n *\n * @param options The logout options\n */\n logout(options?: LogoutOptions): Observable<void> {\n return from(\n this.auth0Client.logout(options).then(() => {\n if (options?.openUrl === false || options?.openUrl) {\n this.authState.refresh();\n }\n })\n );\n }\n\n /**\n * Fetches a new access token and returns the response from the /oauth/token endpoint, omitting the refresh token.\n *\n * @param options The options for configuring the token fetch.\n */\n getAccessTokenSilently(\n options: GetTokenSilentlyOptions & { detailedResponse: true }\n ): Observable<GetTokenSilentlyVerboseResponse>;\n\n /**\n * Fetches a new access token and returns it.\n *\n * @param options The options for configuring the token fetch.\n */\n getAccessTokenSilently(options?: GetTokenSilentlyOptions): Observable<string>;\n\n /**\n * ```js\n * getAccessTokenSilently(options).subscribe(token => ...)\n * ```\n *\n * If there's a valid token stored, return it. Otherwise, opens an\n * iframe with the `/authorize` URL using the parameters provided\n * as arguments. Random and secure `state` and `nonce` parameters\n * will be auto-generated. If the response is successful, results\n * will be valid according to their expiration times.\n *\n * If refresh tokens are used, the token endpoint is called directly with the\n * 'refresh_token' grant. If no refresh token is available to make this call,\n * the SDK falls back to using an iframe to the '/authorize' URL.\n *\n * This method may use a web worker to perform the token call if the in-memory\n * cache is used.\n *\n * If an `audience` value is given to this function, the SDK always falls\n * back to using an iframe to make the token exchange.\n *\n * Note that in all cases, falling back to an iframe requires access to\n * the `auth0` cookie, and thus will not work in browsers that block third-party\n * cookies by default (Safari, Brave, etc).\n *\n * @param options The options for configuring the token fetch.\n */\n getAccessTokenSilently(\n options: GetTokenSilentlyOptions = {}\n ): Observable<string | GetTokenSilentlyVerboseResponse> {\n return of(this.auth0Client).pipe(\n concatMap((client) =>\n options.detailedResponse === true\n ? client.getTokenSilently({ ...options, detailedResponse: true })\n : client.getTokenSilently(options)\n ),\n tap((token) => {\n if (token) {\n this.authState.setAccessToken(\n typeof token === 'string' ? token : token.access_token\n );\n }\n }),\n catchError((error) => {\n this.authState.setError(error);\n this.authState.refresh();\n return throwError(error);\n })\n );\n }\n\n /**\n * ```js\n * getTokenWithPopup(options).subscribe(token => ...)\n * ```\n *\n * Get an access token interactively.\n *\n * Opens a popup with the `/authorize` URL using the parameters\n * provided as arguments. Random and secure `state` and `nonce`\n * parameters will be auto-generated. If the response is successful,\n * results will be valid according to their expiration times.\n */\n getAccessTokenWithPopup(\n options?: GetTokenWithPopupOptions\n ): Observable<string | undefined> {\n return of(this.auth0Client).pipe(\n concatMap((client) => client.getTokenWithPopup(options)),\n tap((token) => {\n if (token) {\n this.authState.setAccessToken(token);\n }\n }),\n catchError((error) => {\n this.authState.setError(error);\n this.authState.refresh();\n return throwError(error);\n })\n );\n }\n\n /**\n * ```js\n * handleRedirectCallback(url).subscribe(result => ...)\n * ```\n *\n * After the browser redirects back to the callback page,\n * call `handleRedirectCallback` to handle success and error\n * responses from Auth0. If the response is successful, results\n * will be valid according to their expiration times.\n *\n * Calling this method also refreshes the authentication and user states.\n *\n * @param url The URL to that should be used to retrieve the `state` and `code` values. Defaults to `window.location.href` if not given.\n */\n handleRedirectCallback(\n url?: string\n ): Observable<\n RedirectLoginResult<TAppState> | ConnectAccountRedirectResult<TAppState>\n > {\n return defer(() =>\n this.auth0Client.handleRedirectCallback<TAppState>(url)\n ).pipe(\n withLatestFrom(this.authState.isLoading$),\n tap(([result, isLoading]) => {\n if (!isLoading) {\n this.authState.refresh();\n }\n const appState = result?.appState;\n const target = appState?.target ?? '/';\n\n if (appState) {\n this.appStateSubject$.next(appState);\n }\n\n this.navigator.navigateByUrl(target);\n }),\n map(([result]) => result)\n );\n }\n\n /**\n * ```js\n * getDpopNonce(id).subscribe(nonce => ...)\n * ```\n *\n * Gets the DPoP nonce for the specified domain or the default domain.\n * The nonce is used in DPoP proof generation for token binding.\n *\n * @param id Optional identifier for the domain. If not provided, uses the default domain.\n * @returns An Observable that emits the DPoP nonce string or undefined if not available.\n */\n getDpopNonce(id?: string): Observable<string | undefined> {\n return from(this.auth0Client.getDpopNonce(id));\n }\n\n /**\n * ```js\n * setDpopNonce(nonce, id).subscribe(() => ...)\n * ```\n *\n * Sets the DPoP nonce for the specified domain or the default domain.\n * This is typically used after receiving a new nonce from the authorization server.\n *\n * @param nonce The DPoP nonce value to set.\n * @param id Optional identifier for the domain. If not provided, uses the default domain.\n * @returns An Observable that completes when the nonce is set.\n */\n setDpopNonce(nonce: string, id?: string): Observable<void> {\n return from(this.auth0Client.setDpopNonce(nonce, id));\n }\n\n /**\n * ```js\n * generateDpopProof(params).subscribe(proof => ...)\n * ```\n *\n * Generates a DPoP (Demonstrating Proof-of-Possession) proof JWT.\n * This proof is used to bind access tokens to a specific client, providing\n * an additional layer of security for token usage.\n *\n * @param params Configuration for generating the DPoP proof\n * @param params.url The URL of the resource server endpoint\n * @param params.method The HTTP method (e.g., 'GET', 'POST')\n * @param params.nonce Optional DPoP nonce from the authorization server\n * @param params.accessToken The access token to bind to the proof\n * @returns An Observable that emits the generated DPoP proof as a JWT string.\n */\n generateDpopProof(params: {\n url: string;\n method: string;\n nonce?: string;\n accessToken: string;\n }): Observable<string> {\n return from(this.auth0Client.generateDpopProof(params));\n }\n\n /**\n * ```js\n * const fetcher = createFetcher(config);\n * ```\n *\n * Creates a custom fetcher instance that can be used to make authenticated\n * HTTP requests. The fetcher automatically handles token refresh and can\n * be configured with custom request/response handling.\n *\n * @param config Optional configuration for the fetcher\n * @returns A Fetcher instance configured with the Auth0 client.\n */\n createFetcher<TOutput extends CustomFetchMinimalOutput = Response>(\n config?: FetcherConfig<TOutput>\n ): Fetcher<TOutput> {\n return this.auth0Client.createFetcher(config);\n }\n\n private shouldHandleCallback(): Observable<boolean> {\n return of(location.search).pipe(\n map((search) => {\n const searchParams = new URLSearchParams(search);\n return (\n (searchParams.has('code') || searchParams.has('error')) &&\n searchParams.has('state') &&\n !this.configFactory.get().skipRedirectCallback\n );\n })\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n RouterStateSnapshot,\n Route,\n UrlSegment,\n} from '@angular/router';\nimport { Observable, of } from 'rxjs';\nimport { take, switchMap, map } from 'rxjs/operators';\nimport { AuthService } from './auth.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthGuard {\n constructor(private auth: AuthService) {}\n\n canLoad(route: Route, segments: UrlSegment[]): Observable<boolean> {\n return this.auth.isAuthenticated$.pipe(take(1));\n }\n\n canActivate(\n next: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean> {\n return this.redirectIfUnauthenticated(state);\n }\n\n canActivateChild(\n childRoute: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n ): Observable<boolean> {\n return this.redirectIfUnauthenticated(state);\n }\n\n private redirectIfUnauthenticated(\n state: RouterStateSnapshot\n ): Observable<boolean> {\n return this.auth.isAuthenticated$.pipe(\n switchMap((loggedIn) => {\n if (!loggedIn) {\n return this.auth\n .loginWithRedirect({\n appState: { target: state.url },\n })\n .pipe(map(() => false));\n }\n return of(true);\n })\n );\n }\n}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { AuthService } from './auth.service';\nimport { AuthConfig, AuthConfigService, AuthClientConfig } from './auth.config';\nimport { Auth0ClientService, Auth0ClientFactory } from './auth.client';\nimport { AuthGuard } from './auth.guard';\n\n@NgModule()\nexport class AuthModule {\n /**\n * Initialize the authentication module system. Configuration can either be specified here,\n * or by calling AuthClientConfig.set (perhaps from an APP_INITIALIZER factory function).\n *\n * @param config The optional configuration for the SDK.\n */\n static forRoot(config?: AuthConfig): ModuleWithProviders<AuthModule> {\n return {\n ngModule: AuthModule,\n providers: [\n AuthService,\n AuthGuard,\n {\n provide: AuthConfigService,\n useValue: config,\n },\n {\n provide: Auth0ClientService,\n useFactory: Auth0ClientFactory.createClient,\n deps: [AuthClientConfig],\n },\n ],\n };\n }\n}\n","import {\n HttpInterceptor,\n HttpRequest,\n HttpHandler,\n HttpEvent,\n} from '@angular/common/http';\n\nimport { Observable, from, of, iif, throwError } from 'rxjs';\nimport { Inject, Injectable } from '@angular/core';\n\nimport {\n ApiRouteDefinition,\n isHttpInterceptorRouteConfig,\n AuthClientConfig,\n HttpInterceptorConfig,\n} from './auth.config';\n\nimport {\n switchMap,\n first,\n concatMap,\n catchError,\n tap,\n filter,\n mergeMap,\n mapTo,\n pluck,\n map,\n} from 'rxjs/operators';\nimport {\n Auth0Client,\n GetTokenSilentlyOptions,\n GetTokenSilentlyVerboseResponse,\n} from '@auth0/auth0-spa-js';\nimport { Auth0ClientService } from './auth.client';\nimport { AuthState } from './auth.state';\nimport { AuthService } from './auth.service';\n\nconst waitUntil =\n <TSignal>(signal$: Observable<TSignal>) =>\n <TSource>(source$: Observable<TSource>) =>\n source$.pipe(mergeMap((value) => signal$.pipe(first(), mapTo(value))));\n\n@Injectable()\nexport class AuthHttpInterceptor implements HttpInterceptor {\n constructor(\n private configFactory: AuthClientConfig,\n @Inject(Auth0ClientService) private auth0Client: Auth0Client,\n private authState: AuthState,\n private authService: AuthService\n ) {}\n\n intercept(\n req: HttpRequest<any>,\n next: HttpHandler\n ): Observable<HttpEvent<any>> {\n const config = this.configFactory.get();\n if (!config.httpInterceptor?.allowedList) {\n return next.handle(req);\n }\n\n const isLoaded$ = this.authService.isLoading$.pipe(\n filter((isLoading) => !isLoading)\n );\n\n return this.findMatchingRoute(req, config.httpInterceptor).pipe(\n concatMap((route) =>\n iif(\n // Check if a route was matched\n () => route !== null,\n // If we have a matching route, call getTokenSilently and attach the token to the\n // outgoing request\n of(route).pipe(\n waitUntil(isLoaded$),\n pluck('tokenOptions'),\n concatMap<GetTokenSilentlyOptions, Observable<string>>((options) =>\n this.getAccessTokenSilently(options).pipe(\n catchError((err) => {\n if (this.allowAnonymous(route, err)) {\n return of('');\n }\n\n this.authState.setError(err);\n return throwError(err);\n })\n )\n ),\n switchMap((token: string) => {\n // Clone the request and attach the bearer token\n const clone = token\n ? req.clone({\n headers: req.headers.set(\n 'Authorization',\n `Bearer ${token}`\n ),\n })\n : req;\n\n return next.handle(clone);\n })\n ),\n // If the URI being called was not found in our httpInterceptor config, simply\n // pass the request through without attaching a token\n next.handle(req)\n )\n )\n );\n }\n\n /**\n * Duplicate of AuthService.getAccessTokenSilently, but with a slightly different error handling.\n * Only used internally in the interceptor.\n *\n * @param options The options for configuring the token fetch.\n */\n private getAccessTokenSilently(\n options?: GetTokenSilentlyOptions\n ): Observable<string> {\n return of(this.auth0Client).pipe(\n concatMap((client) => client.getTokenSilently(options)),\n map((tokenOrResponse: string | GetTokenSilentlyVerboseResponse) => {\n // Extract access_token from detailed response when detailedResponse: true\n if (typeof tokenOrResponse === 'string') return tokenOrResponse;\n return tokenOrResponse.access_token;\n }),\n tap((token) => this.authState.setAccessToken(token)),\n catchError((error) => {\n this.authState.refresh();\n return throwError(error);\n })\n );\n }\n\n /**\n * Strips the query and fragment from the given uri\n *\n * @param uri The uri to remove the query and fragment from\n */\n private stripQueryFrom(uri: string): string {\n if (uri.indexOf('?') > -1) {\n uri = uri.substr(0, uri.indexOf('?'));\n }\n\n if (uri.indexOf('#') > -1) {\n uri = uri.substr(0, uri.indexOf('#'));\n }\n\n return uri;\n }\n\n /**\n * Determines whether the specified route can have an access token attached to it, based on matching the HTTP request against\n * the interceptor route configuration.\n *\n * @param route The route to test\n * @param request The HTTP request\n */\n private canAttachToken(\n route: ApiRouteDefinition,\n request: HttpRequest<any>\n ): boolean {\n const testPrimitive = (value: string | undefined): boolean => {\n if (!value) {\n return false;\n }\n\n const requestPath = this.stripQueryFrom(request.url);\n\n if (value === requestPath) {\n return true;\n }\n\n // If the URL ends with an asterisk, match using startsWith.\n return (\n value.indexOf('*') === value.length - 1 &&\n request.url.startsWith(value.substr(0, value.length - 1))\n );\n };\n\n if (isHttpInterceptorRouteConfig(route)) {\n if (route.httpMethod && route.httpMethod !== request.method) {\n return false;\n }\n\n /* istanbul ignore if */\n if (!route.uri && !route.uriMatcher) {\n console.warn(\n 'Either a uri or uriMatcher is required when configuring the HTTP interceptor.'\n );\n }\n\n return route.uriMatcher\n ? route.uriMatcher(request.url)\n : testPrimitive(route.uri);\n }\n\n return testPrimitive(route);\n }\n\n /**\n * Tries to match a route from the SDK configuration to the HTTP request.\n * If a match is found, the route configuration is returned.\n *\n * @param request The Http request\n * @param config HttpInterceptorConfig\n */\n private findMatchingRoute(\n request: HttpRequest<any>,\n config: HttpInterceptorConfig\n ): Observable<ApiRouteDefinition | null> {\n return from(config.allowedList).pipe(\n first((route) => this.canAttachToken(route, request), null)\n );\n }\n\n private allowAnonymous(route: ApiRouteDefinition | null, err: any): boolean {\n return (\n !!route &&\n isHttpInterceptorRouteConfig(route) &&\n !!route.allowAnonymous &&\n ['login_required', 'consent_required', 'missing_refresh_token'].includes(\n err.error\n )\n );\n }\n}\n","import { Provider } from '@angular/core';\nimport { Auth0ClientService, Auth0ClientFactory } from './auth.client';\nimport { AuthConfig, AuthConfigService, AuthClientConfig } from './auth.config';\nimport { AuthGuard } from './auth.guard';\nimport { AuthHttpInterceptor } from './auth.interceptor';\nimport { AuthService } from './auth.service';\n\n/**\n * Initialize the authentication system. Configuration can either be specified here,\n * or by calling AuthClientConfig.set (perhaps from an APP_INITIALIZER factory function).\n *\n * Note: Should only be used as of Angular 15, and should not be added to a component's providers.\n *\n * @param config The optional configuration for the SDK.\n *\n * @example\n * bootstrapApplication(AppComponent, {\n * providers: [\n * provideAuth0(),\n * ],\n * });\n */\nexport function provideAuth0(config?: AuthConfig): Provider[] {\n return [\n AuthService,\n AuthHttpInterceptor,\n AuthGuard,\n {\n provide: AuthConfigService,\n useValue: config,\n },\n {\n provide: Auth0ClientService,\n useFactory: Auth0ClientFactory.createClient,\n deps: [AuthClientConfig],\n },\n ];\n}\n","import { HttpEvent, HttpRequest } from '@angular/common/http';\nimport { inject } from '@angular/core';\nimport { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { AuthGuard } from './auth.guard';\nimport { AuthHttpInterceptor } from './auth.interceptor';\n\n/**\n * Functional AuthGuard to ensure routes can only be accessed when authenticated.\n *\n * Note: Should only be used as of Angular 15\n *\n * @param route Contains the information about a route associated with a component loaded in an outlet at a particular moment in time.\n * @param state Represents the state of the router at a moment in time.\n * @returns An Observable, indicating if the route can be accessed or not\n */\nexport const authGuardFn = (\n route: ActivatedRouteSnapshot,\n state: RouterStateSnapshot\n) => inject(AuthGuard).canActivate(route, state);\n\n/**\n * Functional AuthHttpInterceptor to include the access token in matching requests.\n *\n * Note: Should only be used as of Angular 15\n *\n * @param req An outgoing HTTP request with an optional typed body.\n * @param handle Represents the next interceptor in an interceptor chain, or the real backend if there are no\n * further interceptors.\n * @returns An Observable representing the intercepted HttpRequest\n */\nexport const authHttpInterceptorFn = (\n req: HttpRequest<any>,\n handle: (req: HttpRequest<unknown>) => Observable<HttpEvent<unknown>>\n) => inject(AuthHttpInterceptor).intercept(req, { handle });\n","/*\n * Public API Surface of auth0-angular\n */\n\nexport * from './lib/auth.service';\nexport * from './lib/auth.module';\nexport * from './lib/auth.guard';\nexport * from './lib/auth.interceptor';\nexport * from './lib/auth.config';\nexport * from './lib/auth.client';\nexport * from './lib/auth.state';\nexport * from './lib/interfaces';\nexport * from './lib/provide';\nexport * from './lib/functional';\nexport * from './lib/abstract-navigator';\n\nexport {\n AuthorizationParams,\n PopupLoginOptions,\n PopupConfigOptions,\n GetTokenWithPopupOptions,\n GetTokenSilentlyOptions,\n ICache,\n Cacheable,\n LocalStorageCache,\n InMemoryCache,\n IdToken,\n User,\n GenericError,\n TimeoutError,\n MfaRequiredError,\n PopupTimeoutError,\n AuthenticationError,\n PopupCancelledError,\n MissingRefreshTokenError,\n Fetcher,\n FetcherConfig,\n CustomFetchMinimalOutput,\n UseDpopNonceError,\n} from '@auth0/auth0-spa-js';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.AuthClientConfig","i2.AbstractNavigator","i3.AuthState","i1.AuthService","i2.AuthState","i3.AuthService"],"mappings":";;;;;;;;;;AAAA,gBAAe,EAAE,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,OAAO,EAAE;;MCKpD,kBAAkB,CAAA;IAC7B,OAAO,YAAY,CAAC,aAA+B,EAAA;AACjD,QAAA,MAAM,MAAM,GAAG,aAAa,CAAC,GAAG,EAAE;QAElC,IAAI,CAAC,MAAM,EAAE;AACX,YAAA,MAAM,IAAI,KAAK,CACb,mGAAmG,CACpG;;QAGH,OAAO,IAAI,WAAW,CAAC;AACrB,YAAA,GAAG,MAAM;AACT,YAAA,WAAW,EAAE;gBACX,IAAI,EAAE,SAAS,CAAC,IAAI;gBACpB,OAAO,EAAE,SAAS,CAAC,OAAO;AAC1B,gBAAA,GAAG,EAAE;oBACH,c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