diff --git a/projects/common/src/fm/shared/app.config.factory.ts b/projects/common/src/fm/shared/app.config.factory.ts index 52df81c..d010b17 100644 --- a/projects/common/src/fm/shared/app.config.factory.ts +++ b/projects/common/src/fm/shared/app.config.factory.ts @@ -37,7 +37,10 @@ export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthS }).then(() => { let router = injector.get(Router); if (!oauthService.hasValidAccessToken()) { - oauthService.initImplicitFlow(urlPath); + if(appConfig.getConfig("grantType") == "code") + oauthService.initCodeFlow(urlPath); + else + oauthService.initImplicitFlow(urlPath); } else { router.navigateByUrl(urlPath); } diff --git a/src/configuration.json b/src/configuration.json index 73efb01..c7af92c 100644 --- a/src/configuration.json +++ b/src/configuration.json @@ -3,6 +3,7 @@ "clientId": "farmmaps", "audience": "http://farmmaps.awtest.nl/", "requireHttps": false, - "apiEndPoint": "http://farmmaps.awtest.nl" + "apiEndPoint": "http://farmmaps.awtest.nl", + "grantType":"implicit" } \ No newline at end of file