You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
instead of class, angular is now moving on to use const for interceptor
the way you mentioning is no longer valid, we'll have to implement the refresh with the new format, e.g.:
export const authInterceptor = (req: HttpRequest, next: HttpHandlerFn): Observable<HttpEvent> => {
return next(newReq).pipe(
catchError((error) => {
// Catch "401 Unauthorized" responses
if (error instanceof HttpErrorResponse && error.status === 401) {
// mergemap refreshtoken call
}
return throwError(error);
}),
);
any idea please?
The text was updated successfully, but these errors were encountered:
instead of class, angular is now moving on to use const for interceptor
the way you mentioning is no longer valid, we'll have to implement the refresh with the new format, e.g.:
export const authInterceptor = (req: HttpRequest, next: HttpHandlerFn): Observable<HttpEvent> => {
return next(newReq).pipe(
catchError((error) => {
// Catch "401 Unauthorized" responses
if (error instanceof HttpErrorResponse && error.status === 401) {
// mergemap refreshtoken call
}
return throwError(error);
}),
);
any idea please?
The text was updated successfully, but these errors were encountered: