Fix url at page refresh
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2020-04-23 11:11:07 +02:00
parent 3493e96aad
commit 62d5779c75

View File

@ -29,9 +29,10 @@ export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthS
oauthService.setupAutomaticSilentRefresh();
let location = injector.get(Location);
let router = injector.get(Router);
let urlPath = location.path();
oauthService.loadDiscoveryDocument().then(() => {
oauthService.tryLoginCodeFlow().then(() => {
router.navigateByUrl(decodeURIComponent(oauthService.state));
router.navigateByUrl((oauthService.state && oauthService.state!="")?decodeURIComponent(oauthService.state):urlPath);
});
})
}).then(() => {