Login refactor
This commit is contained in:
@@ -20,7 +20,7 @@ export class AuthInterceptor implements HttpInterceptor {
|
||||
|
||||
intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {
|
||||
if (!request.url.includes('/auth/apiToken')) {
|
||||
if (this.auth$.expirationTime.isBefore(moment.utc())) {
|
||||
if (this.auth$.apiTokenExpirationTime.isBefore(moment.utc())) {
|
||||
return this.auth$.getAPITokenObservable().pipe(
|
||||
mergeMap(() => {
|
||||
return next.handle(request.clone({
|
||||
|
||||
Reference in New Issue
Block a user