navigate after refresh
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Willem Dantuma 2020-01-20 18:03:04 +01:00
parent 9277b1fa25
commit 761e987067

View File

@ -40,7 +40,9 @@ export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthS
if (!oauthService.hasValidAccessToken()) { if (!oauthService.hasValidAccessToken()) {
if(appConfig.getConfig("grantType") == "code") if(appConfig.getConfig("grantType") == "code")
if(oauthService.getRefreshToken() != null ) { if(oauthService.getRefreshToken() != null ) {
oauthService.refreshToken(); oauthService.refreshToken().then(() => {
router.navigateByUrl(urlPath);
})
} else { } else {
oauthService.initCodeFlow(urlPath); oauthService.initCodeFlow(urlPath);
} }