Only call credentials_url when authentication is set to login

Also update to newer strophe.js version which contains a bugfix.
This commit is contained in:
JC Brand 2019-07-09 12:34:41 +02:00
parent 5c88d3e836
commit 168f29cf06
3 changed files with 6 additions and 5 deletions

4
package-lock.json generated
View File

@ -13771,8 +13771,8 @@
} }
}, },
"strophe.js": { "strophe.js": {
"version": "github:strophe/strophejs#31f31b52fd37a92eebee7b47d668a7d7dc40df3b", "version": "github:strophe/strophejs#c572c9b1a5c95529784b363fcfe927b281c2f62e",
"from": "github:strophe/strophejs#31f31b52fd37a92eebee7b47d668a7d7dc40df3b" "from": "github:strophe/strophejs#c572c9b1a5c95529784b363fcfe927b281c2f62e"
}, },
"style-loader": { "style-loader": {
"version": "0.23.1", "version": "0.23.1",

View File

@ -1223,7 +1223,7 @@ _converse.initialize = async function (settings, callback) {
if (credentials) { if (credentials) {
this.autoLogin(credentials); this.autoLogin(credentials);
} else if (this.auto_login) { } else if (this.auto_login) {
if (this.credentials_url) { if (this.credentials_url && _converse.authentication === 'login') {
const data = await getLoginCredentials(); const data = await getLoginCredentials();
this.autoLogin(data); this.autoLogin(data);
} else if (!this.jid) { } else if (!this.jid) {
@ -1235,7 +1235,8 @@ _converse.initialize = async function (settings, callback) {
"(via credentials_url)." "(via credentials_url)."
); );
} else { } else {
this.autoLogin(); // Could be ANONYMOUS or EXTERNAL // Could be ANONYMOUS or EXTERNAL or manual passing in of JID and password
this.autoLogin();
} }
} else if (reconnecting) { } else if (reconnecting) {
this.autoLogin(); this.autoLogin();

View File

@ -29,7 +29,7 @@
"jed": "1.1.1", "jed": "1.1.1",
"lodash": "^4.17.11", "lodash": "^4.17.11",
"pluggable.js": "2.0.1", "pluggable.js": "2.0.1",
"strophe.js": "strophe/strophejs#31f31b52fd37a92eebee7b47d668a7d7dc40df3b", "strophe.js": "strophe/strophejs#c572c9b1a5c95529784b363fcfe927b281c2f62e",
"twemoji": "^11.0.1", "twemoji": "^11.0.1",
"urijs": "^1.19.1" "urijs": "^1.19.1"
} }