diff --git a/projects/common/src/fm/shared/app.config.factory.ts b/projects/common/src/fm/shared/app.config.factory.ts index e60dd5c..6a6d66d 100644 --- a/projects/common/src/fm/shared/app.config.factory.ts +++ b/projects/common/src/fm/shared/app.config.factory.ts @@ -39,7 +39,11 @@ export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthS let router = injector.get(Router); if (!oauthService.hasValidAccessToken()) { if(appConfig.getConfig("grantType") == "code") - oauthService.initCodeFlow(urlPath); + if(oauthService.getRefreshToken() != null ) { + oauthService.refreshToken(); + } else { + oauthService.initCodeFlow(urlPath); + } else oauthService.initImplicitFlow(urlPath); } else {