Merge pull request #2563 from sammarshallou/MOBILE-3556

MOBILE-3556 Login: Send extra parameter on token.php check
main
Juan Leyva 2020-10-16 13:16:52 +02:00 committed by GitHub
commit 8f958d7aec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -653,7 +653,8 @@ export class CoreSitesProvider {
* @return A promise to be resolved if the site exists. * @return A promise to be resolved if the site exists.
*/ */
siteExists(siteUrl: string): Promise<void> { siteExists(siteUrl: string): Promise<void> {
return this.http.post(siteUrl + '/login/token.php', {}).timeout(this.wsProvider.getRequestTimeout()).toPromise() return this.http.post(siteUrl + '/login/token.php', { appsitecheck: 1 }).
timeout(this.wsProvider.getRequestTimeout()).toPromise()
.catch(() => { .catch(() => {
// Default error messages are kinda bad, return our own message. // Default error messages are kinda bad, return our own message.
return Promise.reject({error: this.translate.instant('core.cannotconnecttrouble')}); return Promise.reject({error: this.translate.instant('core.cannotconnecttrouble')});