log every auth attempt that names an identity the platform does not know
This commit is contained in:
@@ -2,6 +2,7 @@ import type { Handler } from 'hono';
|
||||
import { getUserCount, createUser } from 'officerdb';
|
||||
import argon2 from 'argon2';
|
||||
import * as errors from '@@/custom-errors';
|
||||
import { rememberUser } from '@@/_middlewares';
|
||||
import { validatePassword } from './validate-password';
|
||||
import { validateUsername } from './validate-username';
|
||||
|
||||
@@ -43,5 +44,9 @@ export const bootstrapHandler: Handler = async function (ctx) {
|
||||
role: 'Super Admin',
|
||||
});
|
||||
|
||||
// The launch-time snapshot was taken while the user table was still empty. Without this the owner's
|
||||
// very first sign-in would be filed as an unknown identity.
|
||||
rememberUser(user);
|
||||
|
||||
return ctx.json({ ok: true });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user