ip geolocation + ping analysis
This commit is contained in:
+6
-10
@@ -5,6 +5,7 @@ type Props = {
|
||||
export default async function LoginPage({ searchParams }: Props) {
|
||||
const { error } = await searchParams;
|
||||
const invalid = error === "1";
|
||||
const locked = error === "locked";
|
||||
|
||||
return (
|
||||
<div className="flex min-h-full flex-1 items-center justify-center bg-zinc-100 px-4 dark:bg-zinc-950">
|
||||
@@ -12,16 +13,6 @@ export default async function LoginPage({ searchParams }: Props) {
|
||||
<h1 className="text-center text-xl font-semibold text-zinc-900 dark:text-zinc-50">
|
||||
Admin sign in
|
||||
</h1>
|
||||
<p className="mt-2 text-center text-sm text-zinc-500 dark:text-zinc-400">
|
||||
Default:{" "}
|
||||
<code className="rounded bg-zinc-100 px-1.5 py-0.5 text-zinc-800 dark:bg-zinc-800 dark:text-zinc-200">
|
||||
admin
|
||||
</code>{" "}
|
||||
/{" "}
|
||||
<code className="rounded bg-zinc-100 px-1.5 py-0.5 text-zinc-800 dark:bg-zinc-800 dark:text-zinc-200">
|
||||
admin
|
||||
</code>
|
||||
</p>
|
||||
<form
|
||||
action="/api/auth/login"
|
||||
method="post"
|
||||
@@ -58,6 +49,11 @@ export default async function LoginPage({ searchParams }: Props) {
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
{locked ? (
|
||||
<p className="text-sm text-red-600 dark:text-red-400" role="alert">
|
||||
Too many failed attempts. Wait about 15 minutes, then try again.
|
||||
</p>
|
||||
) : null}
|
||||
{invalid ? (
|
||||
<p className="text-sm text-red-600 dark:text-red-400" role="alert">
|
||||
Invalid username or password.
|
||||
|
||||
Reference in New Issue
Block a user