mirror of
https://github.com/wireadmin/wireadmin
synced 2025-01-23 04:17:00 +00:00
fix
This commit is contained in:
parent
3f9c4ea36c
commit
b0663a7e15
@ -13,7 +13,6 @@ export default withAuth({
|
||||
// See "Matching Paths" below to learn more
|
||||
export const config = {
|
||||
matcher: [
|
||||
// Match all request paths except for the `/api/auth/*` paths
|
||||
'/((?!api/auth|login|fonts|_next/static|_next/image|favicon.ico).*)',
|
||||
'/((?!api/auth|login|logo.png|fonts|_next/static|_next/image|favicon.ico).*)'
|
||||
],
|
||||
}
|
@ -9,7 +9,10 @@ function publicENV(ex = {}) {
|
||||
const nextConfig = {
|
||||
reactStrictMode: true,
|
||||
transpilePackages: [],
|
||||
env: publicENV({ NEXTAUTH_URL: 'http://localhost:3000' })
|
||||
env: publicENV({ NEXTAUTH_URL: 'http://127.0.0.1:3000' }),
|
||||
images: {
|
||||
domains: [ 'img.shields.io' ]
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = nextConfig;
|
||||
|
@ -3,9 +3,11 @@ import PageFooter from "@ui/pages/PageFooter";
|
||||
import React from "react";
|
||||
import Image from "next/image";
|
||||
import { Button, Form, Input } from "antd";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
export default function LoginPage() {
|
||||
|
||||
const router = useRouter()
|
||||
const [ form ] = Form.useForm()
|
||||
|
||||
async function handleFinish({ password }: { password: string | undefined }) {
|
||||
@ -15,9 +17,11 @@ export default function LoginPage() {
|
||||
|
||||
await signIn(
|
||||
'credentials',
|
||||
{ callbackUrl: '/' },
|
||||
{ redirect: false },
|
||||
{ password }
|
||||
)
|
||||
|
||||
await router.push('/')
|
||||
}
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user