MOBILE-3039 core: Fix load logged out site with SSO

main
Dani Palou 2019-05-28 09:13:11 +02:00
parent 4f1cd6a94e
commit 838646f085
2 changed files with 9 additions and 0 deletions

View File

@ -938,6 +938,8 @@ export class CoreLoginHelperProvider {
promise.then(() => {
this.waitingForBrowser = true;
this.sitesProvider.unsetCurrentSite(); // We need to unset current site to make authentication work fine.
this.openBrowserForSSOLogin(result.siteUrl, result.code, result.service,
result.config && result.config.launchurl, data.pageName, data.params);
}).catch(() => {

View File

@ -1181,6 +1181,13 @@ export class CoreSitesProvider {
});
}
/**
* Unset current site.
*/
unsetCurrentSite(): void {
this.currentSite = undefined;
}
/**
* Updates a site's token.
*