things
This commit is contained in:
parent
79ee04478a
commit
5b95593d9c
@ -17,7 +17,7 @@
|
|||||||
<h2>Log in</h2>
|
<h2>Log in</h2>
|
||||||
<form action="/api/login" method="post">
|
<form action="/api/login" method="post">
|
||||||
<label for="username">Username: </label>
|
<label for="username">Username: </label>
|
||||||
<input id="username" name="username" type="text" required><br/>
|
<input id="username" name="username" type="text" autocomplete="off" required><br />
|
||||||
<label for="password">Password: </label>
|
<label for="password">Password: </label>
|
||||||
<input id="password" name="password" type="password" required><br />
|
<input id="password" name="password" type="password" required><br />
|
||||||
<input type="submit" value="Log in">
|
<input type="submit" value="Log in">
|
||||||
@ -26,7 +26,7 @@
|
|||||||
<h2>Register</h2>
|
<h2>Register</h2>
|
||||||
<form action="/api/register" method="post">
|
<form action="/api/register" method="post">
|
||||||
<label for="username">Username: </label>
|
<label for="username">Username: </label>
|
||||||
<input id="username" name="username" type="text" required><br />
|
<input id="username" name="username" type="text" autocomplete="off" required><br />
|
||||||
<label for="password">Password: </label>
|
<label for="password">Password: </label>
|
||||||
<input id="password" name="password" type="password" required><br />
|
<input id="password" name="password" type="password" required><br />
|
||||||
<input type="submit" value="Register">
|
<input type="submit" value="Register">
|
||||||
|
@ -167,7 +167,7 @@ class Server extends EventEmitter {
|
|||||||
this.logger.info(`${profile.username} (${profile.id}) is logging in.`);
|
this.logger.info(`${profile.username} (${profile.id}) is logging in.`);
|
||||||
const user = await this.userDatabase.userFromDiscord(profile);
|
const user = await this.userDatabase.userFromDiscord(profile);
|
||||||
callback(null, user);
|
callback(null, user);
|
||||||
}), { successRedirect: '/api/login/discord/finalise' });
|
}), { successRedirect: '/home' });
|
||||||
|
|
||||||
this.authenticator.addStrategy('local', new LocalStrategy(async (username, password, callback) => {
|
this.authenticator.addStrategy('local', new LocalStrategy(async (username, password, callback) => {
|
||||||
const user = await this.userDatabase.findUser(username);
|
const user = await this.userDatabase.findUser(username);
|
||||||
|
@ -30,6 +30,8 @@ class User {
|
|||||||
/** @private */
|
/** @private */
|
||||||
this._passwordHash = data.password || null;
|
this._passwordHash = data.password || null;
|
||||||
|
|
||||||
|
this.cachedTimestamp = Date.now();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get id () {
|
get id () {
|
||||||
|
Loading…
Reference in New Issue
Block a user