From 3dca804acd45ca0c687c2007163814df8c1f8dd4 Mon Sep 17 00:00:00 2001 From: Willem Dantuma Date: Mon, 20 Jan 2020 18:05:45 +0100 Subject: [PATCH] Re login after refresh error --- projects/common/src/fm/shared/app.config.factory.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/common/src/fm/shared/app.config.factory.ts b/projects/common/src/fm/shared/app.config.factory.ts index 2dfbd7e..51ef18e 100644 --- a/projects/common/src/fm/shared/app.config.factory.ts +++ b/projects/common/src/fm/shared/app.config.factory.ts @@ -42,7 +42,10 @@ export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthS if(oauthService.getRefreshToken() != null ) { oauthService.refreshToken().then(() => { router.navigateByUrl(urlPath); - }) + }).catch(() => { + oauthService.initCodeFlow(urlPath); + } + ) } else { oauthService.initCodeFlow(urlPath); }