Compare commits

..

No commits in common. "55cec2e0559151183627dcae93c737c3022dcbd4" and "c267b489e4b369bed833185087e7f9be2469ecdd" have entirely different histories.

3 changed files with 8 additions and 6 deletions

View File

@ -1,12 +1,12 @@
import getEnv from "@/lib/env-entry" import getEnv from "@/lib/env-entry"
import CryptoJS from "crypto-js" import bcrypt from "bcrypt"
import NextAuth from "next-auth" import NextAuth from "next-auth"
import CredentialsProvider from "next-auth/providers/credentials" import CredentialsProvider from "next-auth/providers/credentials"
export const { handlers, signIn, signOut, auth } = NextAuth({ export const { handlers, signIn, signOut, auth } = NextAuth({
secret: secret:
process.env.AUTH_SECRET ?? process.env.AUTH_SECRET ??
CryptoJS.MD5(`this_is_nezha_dash_web_secret_${getEnv("SitePassword")}`).toString(), bcrypt.hashSync(`this_is_nezha_dash_web_secret_${getEnv("SitePassword")}`, 10),
trustHost: (process.env.AUTH_TRUST_HOST as boolean | undefined) ?? true, trustHost: (process.env.AUTH_TRUST_HOST as boolean | undefined) ?? true,
providers: [ providers: [
CredentialsProvider({ CredentialsProvider({

BIN
bun.lockb

Binary file not shown.

View File

@ -1,6 +1,6 @@
{ {
"name": "nezha-dash", "name": "nezha-dash",
"version": "2.9.1", "version": "2.9.0",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev -p 3040", "dev": "next dev -p 3040",
@ -26,10 +26,12 @@
"@radix-ui/react-switch": "^1.1.3", "@radix-ui/react-switch": "^1.1.3",
"@radix-ui/react-tooltip": "^1.1.8", "@radix-ui/react-tooltip": "^1.1.8",
"@trivago/prettier-plugin-sort-imports": "^5.2.2", "@trivago/prettier-plugin-sort-imports": "^5.2.2",
"@types/bcrypt": "^5.0.2",
"@types/crypto-js": "^4.2.2", "@types/crypto-js": "^4.2.2",
"@types/d3-geo": "^3.1.0", "@types/d3-geo": "^3.1.0",
"@types/luxon": "^3.4.2", "@types/luxon": "^3.4.2",
"babel-plugin-react-compiler": "^19.0.0-beta-e552027-20250112", "babel-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
"bcrypt": "^5.1.1",
"caniuse-lite": "^1.0.30001707", "caniuse-lite": "^1.0.30001707",
"class-variance-authority": "^0.7.1", "class-variance-authority": "^0.7.1",
"clsx": "^2.1.1", "clsx": "^2.1.1",
@ -41,7 +43,7 @@
"flag-icons": "^7.3.2", "flag-icons": "^7.3.2",
"i18n-iso-countries": "^7.14.0", "i18n-iso-countries": "^7.14.0",
"lucide-react": "^0.474.0", "lucide-react": "^0.474.0",
"luxon": "^3.6.0", "luxon": "^3.5.0",
"maxmind": "^4.3.24", "maxmind": "^4.3.24",
"next": "^15.2.4", "next": "^15.2.4",
"next-auth": "^5.0.0-beta.25", "next-auth": "^5.0.0-beta.25",
@ -62,12 +64,12 @@
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.9.4", "@biomejs/biome": "1.9.4",
"@next/bundle-analyzer": "^15.2.4", "@next/bundle-analyzer": "^15.2.4",
"@tailwindcss/postcss": "^4.0.16", "@tailwindcss/postcss": "^4.0.15",
"@types/node": "^22.13.13", "@types/node": "^22.13.13",
"@types/react": "^19.0.12", "@types/react": "^19.0.12",
"@types/react-dom": "^19.0.4", "@types/react-dom": "^19.0.4",
"postcss": "^8.5.3", "postcss": "^8.5.3",
"tailwindcss": "^4.0.16", "tailwindcss": "^4.0.15",
"typescript": "^5.8.2", "typescript": "^5.8.2",
"vercel": "^41.4.1" "vercel": "^41.4.1"
}, },