Try to refresh on startup
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
This commit is contained in:
parent
f99dfc965f
commit
9103753b09
@ -39,7 +39,11 @@ export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthS
|
|||||||
let router = injector.get(Router);
|
let router = injector.get(Router);
|
||||||
if (!oauthService.hasValidAccessToken()) {
|
if (!oauthService.hasValidAccessToken()) {
|
||||||
if(appConfig.getConfig("grantType") == "code")
|
if(appConfig.getConfig("grantType") == "code")
|
||||||
|
if(oauthService.getRefreshToken() != null ) {
|
||||||
|
oauthService.refreshToken();
|
||||||
|
} else {
|
||||||
oauthService.initCodeFlow(urlPath);
|
oauthService.initCodeFlow(urlPath);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
oauthService.initImplicitFlow(urlPath);
|
oauthService.initImplicitFlow(urlPath);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user