-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Labels
bugThis points to a verified bug in the codeThis points to a verified bug in the code
Description
Checklist
- The issue can be reproduced in the auth0-angular sample app (or N/A).
- I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
RxJS versions compatibility issue.
Reproduction
I created nx monorepo project with angular 19.2.
Added @auth0/auth0-angular": "^2.2.3"
Trying to add httpInterceptor according to manual:
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';
import { appRoutes } from './app.routes';
import { authHttpInterceptorFn, provideAuth0 } from '@auth0/auth0-angular';
import {
provideHttpClient,
withFetch,
withInterceptors,
} from '@angular/common/http';
export const appConfig: ApplicationConfig = {
providers: [
provideHttpClient(withFetch(), withInterceptors([authHttpInterceptorFn])),
provideAuth0({
domain: 'dev-******.com',
clientId: '********',
authorizationParams: {
redirect_uri: window.location.origin,
},
httpInterceptor: {
allowedList: ['/api'],
},
}),
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouter(appRoutes),
],
};This sample gives me an error:
✘ [ERROR] TS2328: Types of parameters 'handle' and 'next' are incompatible.
Call signature return types 'Observable<HttpEvent<unknown>>' and 'Observable<HttpEvent<unknown>>' are incompatible.
The types of 'source' are incompatible between these types.
Type 'import("/Users/solshark/Development/**/node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/types/internal/Observable").Observable<any> | undefined' is not assignable to type 'import("/Users/solshark/Development/**/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/types/internal/Observable").Observable<any> | undefined'.
Type 'import("/Users/solshark/Development/**/node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/types/internal/Observable").Observable<any>' is not assignable to type 'import("/Users/solshark/Development/**/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/types/internal/Observable").Observable<any>'.
Types of property 'operator' are incompatible.
Type 'import("/Users/solshark/Development/**/node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/types/internal/Operator").Operator<any, any> | undefined' is not assignable to type 'import("/Users/solshark/Development/**/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/types/internal/Operator").Operator<any, any> | undefined'.
Type 'import("/Users/solshark/Development/**/node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/types/internal/Operator").Operator<any, any>' is not assignable to type 'import("/Users/solshark/Development/**/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/types/internal/Operator").Operator<any, any>'.
Types of property 'call' are incompatible.
Type '(subscriber: import("/Users/solshark/Development/**/node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/types/internal/Subscriber").Subscriber<any>, source: any) => import("/Users/solshark/Development/**/node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/types/internal/types").TeardownLogic' is not assignable to type '(subscriber: import("/Users/solshark/Development/**/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/types/internal/Subscriber").Subscriber<any>, source: any) => import("/Users/solshark/Development/**/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/types/internal/types").TeardownLogic'.
Types of parameters 'subscriber' and 'subscriber' are incompatible.
Type 'import("/Users/solshark/Development/**/node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/types/internal/Subscriber").Subscriber<any>' is not assignable to type 'import("/Users/solshark/Development/**/node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/types/internal/Subscriber").Subscriber<any>'.
Property 'isStopped' is protected but type 'Subscriber<T>' is not a class derived from 'Subscriber<T>'. [plugin angular-compiler]
apps/portal/src/app/app.config.ts:13:53:
13 │ ...ttpClient(withFetch(), withInterceptors([authHttpInterceptorFn])),
╵ ~~~~~~~~~~~~~~~~~~~~~
Additional context
No response
auth0-angular version
2.2.3
Angular version
19.2
Which browsers have you tested in?
Safari
Metadata
Metadata
Assignees
Labels
bugThis points to a verified bug in the codeThis points to a verified bug in the code