Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/core/login/providers/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,16 @@ export class CoreLoginHelperProvider {
goToNoSitePage(navCtrl: NavController, page: string, params?: any): Promise<any> {
navCtrl = navCtrl || this.appProvider.getRootNavController();

if (page == 'CoreLoginSitesPage') {
const currentPage = navCtrl && navCtrl.getActive().component.name;

if (page == currentPage) {
// Already at page, nothing to do.
} else if (page == 'CoreLoginSitesPage') {
// Just open the page as root.
return navCtrl.setRoot(page, params);
} else if (page == 'CoreLoginCredentialsPage' && currentPage == 'CoreLoginSitePage') {
// Just open the new page to keep the navigation history.
return navCtrl.push(page, params);
} else {
// Check if there is any site stored.
return this.sitesProvider.hasSites().then((hasSites) => {
Expand Down
2 changes: 1 addition & 1 deletion src/providers/urlschemes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class CoreCustomURLSchemesProvider {
await this.sitesProvider.checkRequiredMinimumVersion(result.config);
}

return this.sitesProvider.newSite(data.siteUrl, data.token, data.privateToken, data.isSSOToken,
return this.sitesProvider.newSite(data.siteUrl, data.token, data.privateToken, !!data.isSSOToken,
this.loginHelper.getOAuthIdFromParams(data.ssoUrlParams));
} else {
// Token belongs to current site, no need to create it.
Expand Down