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:
parent
918b7382b8
commit
ad8ec4b1e6
@ -1353,17 +1353,6 @@ part/quit messages where we don't load previews (adds a blank line otherwise) */
|
|||||||
margin-top: 10px;
|
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 {
|
#sign-in .btn {
|
||||||
margin-top: 25px;
|
margin-top: 25px;
|
||||||
}
|
}
|
||||||
|
@ -97,12 +97,6 @@
|
|||||||
<input class="input" type="password" name="password">
|
<input class="input" type="password" name="password">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</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;">
|
<div class="col-xs-12 error" style="display: none;">
|
||||||
Authentication failed.
|
Authentication failed.
|
||||||
</div>
|
</div>
|
||||||
|
@ -78,11 +78,6 @@ a:hover,
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sign-in .remember {
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#sidebar .chan:first-child {
|
#sidebar .chan:first-child {
|
||||||
color: #00ff0e;
|
color: #00ff0e;
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ function index(req, res, next) {
|
|||||||
res.render("index", data);
|
res.render("index", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
function initializeClient(socket, client, generateToken, token) {
|
function initializeClient(socket, client, token) {
|
||||||
socket.emit("authorized");
|
socket.emit("authorized");
|
||||||
|
|
||||||
socket.on("disconnect", function() {
|
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) => {
|
client.generateToken((newToken) => {
|
||||||
token = newToken;
|
token = newToken;
|
||||||
|
|
||||||
@ -457,7 +457,7 @@ function performAuthentication(data) {
|
|||||||
const socket = this;
|
const socket = this;
|
||||||
let client;
|
let client;
|
||||||
|
|
||||||
const finalInit = () => initializeClient(socket, client, !!data.remember, data.token || null);
|
const finalInit = () => initializeClient(socket, client, data.token || null);
|
||||||
|
|
||||||
const initClient = () => {
|
const initClient = () => {
|
||||||
client.ip = getClientIp(socket.request);
|
client.ip = getClientIp(socket.request);
|
||||||
|
Loading…
Reference in New Issue
Block a user