Remove the "Stay signed in" checkbox at login

This option is less and less the norm on modern webapps, it is fair to assume this is the default behavior. In fact, we were making it the default.

But more importantly, coming soon is the ability of remotely logging out of your other sessions, which is well handled through token deletion. That means we need to know about said tokens, which are not sent in no-"Stay signed in" version.
This commit is contained in:
Jérémie Astori 2017-08-26 12:37:56 -04:00
parent 918b7382b8
commit ad8ec4b1e6
No known key found for this signature in database
GPG Key ID: B9A4F245CD67BDE8
4 changed files with 3 additions and 25 deletions

View File

@ -1353,17 +1353,6 @@ part/quit messages where we don't load previews (adds a blank line otherwise) */
margin-top: 10px;
}
#sign-in .remember {
float: left;
font-size: 14px;
margin-top: 12px;
}
#sign-in .remember input {
float: left;
margin: 3px 10px 0 0;
}
#sign-in .btn {
margin-top: 25px;
}

View File

@ -97,12 +97,6 @@
<input class="input" type="password" name="password">
</label>
</div>
<div class="col-xs-12">
<label class="remember">
<input type="checkbox" name="remember" value="on" id="sign-in-remember" checked>
Stay signed in
</label>
</div>
<div class="col-xs-12 error" style="display: none;">
Authentication failed.
</div>

View File

@ -78,11 +78,6 @@ a:hover,
font-size: 12px;
}
#sign-in .remember {
font-size: 12px;
line-height: 30px;
}
#sidebar .chan:first-child {
color: #00ff0e;
}

View File

@ -203,7 +203,7 @@ function index(req, res, next) {
res.render("index", data);
}
function initializeClient(socket, client, generateToken, token) {
function initializeClient(socket, client, token) {
socket.emit("authorized");
socket.on("disconnect", function() {
@ -376,7 +376,7 @@ function initializeClient(socket, client, generateToken, token) {
});
};
if (generateToken) {
if (!Helper.config.public && token === null) {
client.generateToken((newToken) => {
token = newToken;
@ -457,7 +457,7 @@ function performAuthentication(data) {
const socket = this;
let client;
const finalInit = () => initializeClient(socket, client, !!data.remember, data.token || null);
const finalInit = () => initializeClient(socket, client, data.token || null);
const initClient = () => {
client.ip = getClientIp(socket.request);