Prioritise logging in with credentials_url...
above logging in with passed in JID and password, since the password might be an expired token.
This commit is contained in:
parent
778b4ff131
commit
179c0810c7
@ -427,10 +427,12 @@ async function attemptNonPreboundSession (credentials) {
|
|||||||
if (_converse.authentication === _converse.LOGIN) {
|
if (_converse.authentication === _converse.LOGIN) {
|
||||||
if (credentials) {
|
if (credentials) {
|
||||||
connect(credentials);
|
connect(credentials);
|
||||||
|
} else if (_converse.credentials_url) {
|
||||||
|
// We give credentials_url preference, because
|
||||||
|
// _converse.connection.pass might be an expired token.
|
||||||
|
connect(await getLoginCredentials());
|
||||||
} else if (_converse.jid && (_converse.password || _converse.connection.pass)) {
|
} else if (_converse.jid && (_converse.password || _converse.connection.pass)) {
|
||||||
connect();
|
connect();
|
||||||
} else if (_converse.credentials_url) {
|
|
||||||
connect(await getLoginCredentials());
|
|
||||||
} else if (!_converse.isTestEnv() && window.PasswordCredential) {
|
} else if (!_converse.isTestEnv() && window.PasswordCredential) {
|
||||||
connect(await getLoginCredentialsFromBrowser());
|
connect(await getLoginCredentialsFromBrowser());
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user