How to redirect to Login using interceptor and Storage?

Hello everyone .

I am using interceptors on my app, and I’ve followed this tutorial :

I’ve done some modification for it only function when error is 403( its my error when token is expired)

intercept(request: HttpRequest, next: HttpHandler): Observable<HttpEvent> {

let promise ='token');

return Observable.fromPromise(promise)
  .mergeMap(token => {
    let clonedReq = this.addToken(request, token);
    return next.handle(clonedReq).pipe(
      catchError(error => {
        // Perhaps display an error for specific status codes here already?
        if (error.status === 403) {
          // not authorized error .. do something
          let msg = error.message;

          let alert = this.alertCtrl.create({
            message: msg,
            buttons: ['OK']
        // Pass the error to the caller of the function
        // return Observable.throw(error);
        //return _throw(error);
        return Observable.of(error);


// Adds the token to your headers if it exists
private addToken(request: HttpRequest, token: any) {
if (token) {
let clone: HttpRequest;
clone = request.clone({
setHeaders: {
Accept: application/json,
‘Content-Type’: application/json,
Authorization: Bearer ${token}
return clone;
return request;

The context is : My component is requesting simultaneously 3 http requests, and they are catched by the interceptor’s catch block (which has an alert). I’m watching 3 alerts, but I want to get just 1 and ignore the others because The first one will be replaced to return the login page and remove storage.

private cleanApp() {
let nav =;
How can I get that , thank you in advance.