Implement user-specific tutorial access and enhance authentication handling
This commit is contained in:
@@ -12,15 +12,25 @@ export class AuthInterceptor implements HttpInterceptor {
|
||||
constructor(private token: TokenStorageService) { }
|
||||
|
||||
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||
let authReq = req;
|
||||
|
||||
|
||||
req = req.clone({
|
||||
withCredentials: true,
|
||||
});
|
||||
|
||||
return next.handle(req);
|
||||
|
||||
|
||||
/*let authReq = req;
|
||||
const token = this.token.getToken();
|
||||
if (token != null) {
|
||||
authReq = req.clone({ headers: req.headers.set(TOKEN_HEADER_KEY, 'Bearer ' + token) });
|
||||
}
|
||||
return next.handle(authReq);
|
||||
return next.handle(authReq);*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export const authInterceptorProviders = [
|
||||
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
|
||||
];
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user