Commit 43bbae90 authored by JC Brand's avatar JC Brand

Don't require `auto_login` to be true when using the API to log in

parent 57d2f9bc
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
can't be established. can't be established.
- Remove `Login` and `Registration` tabs and consolidate into one panel. - Remove `Login` and `Registration` tabs and consolidate into one panel.
- Add validation message for an invalid JID in the login form. - Add validation message for an invalid JID in the login form.
- Don't require `auto_login` to be `true` when using the API to log in.
- #828 Add routing for the `#converse-login` and `#converse-register` URL - #828 Add routing for the `#converse-login` and `#converse-register` URL
fragments, which will render the registration and login forms respectively. fragments, which will render the registration and login forms respectively.
......
...@@ -1722,12 +1722,13 @@ ...@@ -1722,12 +1722,13 @@
if (!reconnecting && this.keepalive && this.restoreBOSHSession()) { if (!reconnecting && this.keepalive && this.restoreBOSHSession()) {
return; return;
} }
if (this.auto_login) {
if (credentials) { if (credentials) {
// When credentials are passed in, they override prebinding // When credentials are passed in, they override prebinding
// or credentials fetching via HTTP // or credentials fetching via HTTP
this.autoLogin(credentials); this.autoLogin(credentials);
} else if (this.credentials_url) { } else if (this.auto_login) {
if (this.credentials_url) {
this.fetchLoginCredentials().then( this.fetchLoginCredentials().then(
this.autoLogin.bind(this), this.autoLogin.bind(this),
this.autoLogin.bind(this) this.autoLogin.bind(this)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment