diff --git a/src/app/sign-in/page.tsx b/src/app/sign-in/page.tsx
index d36d974e..d475cd4a 100644
--- a/src/app/sign-in/page.tsx
+++ b/src/app/sign-in/page.tsx
@@ -1,21 +1,21 @@
import { auth } from '@/auth';
-import LoginButton from '@/components/LoginButton';
+import SignInForm from '@/auth/SignInForm';
import { cc } from '@/utility/css';
-import Link from 'next/link';
import { redirect } from 'next/navigation';
export default async function SignInPage() {
const session = await auth();
+
if (session?.user) {
redirect('/');
}
+
return (
@@ -30,7 +32,7 @@ export default function FieldSet({
name={id}
value={value}
onChange={e => onChange?.(e.target.value)}
- type="text"
+ type={type}
autoComplete="off"
readOnly={readOnly}
className="w-full"
diff --git a/src/components/InfoBlock.tsx b/src/components/InfoBlock.tsx
index d86e29af..2386dd70 100644
--- a/src/components/InfoBlock.tsx
+++ b/src/components/InfoBlock.tsx
@@ -3,13 +3,18 @@ import { ReactNode } from 'react';
export default function InfoBlock({
children,
+ className,
+ padding = 'loose',
}: {
children: ReactNode
+ className?: string
+ padding?: 'loose' | 'normal';
} ) {
return (
{children}
diff --git a/src/components/LoginButton.tsx b/src/components/LoginButton.tsx
deleted file mode 100644
index 4cc2c12f..00000000
--- a/src/components/LoginButton.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client';
-
-import { signIn } from 'next-auth/react';
-
-export default function LoginButton() {
- return (
-
signIn('github', { callbackUrl: '/' })}
- >
- Sign in
-
- );
-}
\ No newline at end of file
diff --git a/src/middleware.ts b/src/middleware.ts
index 72ff19f6..4596922f 100644
--- a/src/middleware.ts
+++ b/src/middleware.ts
@@ -1,5 +1,5 @@
export { auth as middleware } from './auth';
export const config = {
- matcher: ['/admin/:path*'],
+ matcher: ['/((?!api|_next/static|_next/image|favicon.ico).*)'],
};
diff --git a/src/site/globals.css b/src/site/globals.css
index d9259139..b2002f91 100644
--- a/src/site/globals.css
+++ b/src/site/globals.css
@@ -16,7 +16,7 @@
tracking-wider
}
button, .button,
- input[type=text] {
+ input[type=text], input[type=password] {
@apply
px-2 py-1.5
border rounded-md
@@ -25,7 +25,7 @@
font-mono text-base leading-none
min-h-[2.25rem]
}
- input[type=text] {
+ input[type=text], input[type=password] {
@apply
min-w-[20rem] read-only:cursor-default
read-only:bg-gray-100