get env variables
Gitea/subman-nextjs/pipeline/head This commit looks good
Details
Gitea/subman-nextjs/pipeline/head This commit looks good
Details
This commit is contained in:
parent
392110f55c
commit
885f5cd56c
|
@ -10,6 +10,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hookform/resolvers": "^3.6.0",
|
"@hookform/resolvers": "^3.6.0",
|
||||||
"@mapbox/node-pre-gyp": "^1.0.11",
|
"@mapbox/node-pre-gyp": "^1.0.11",
|
||||||
|
"@next/env": "^14.2.14",
|
||||||
"@prisma/client": "^5.15.0",
|
"@prisma/client": "^5.15.0",
|
||||||
"@radix-ui/react-checkbox": "^1.0.4",
|
"@radix-ui/react-checkbox": "^1.0.4",
|
||||||
"@radix-ui/react-context-menu": "^2.2.1",
|
"@radix-ui/react-context-menu": "^2.2.1",
|
||||||
|
@ -227,10 +228,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@next/env": {
|
"node_modules/@next/env": {
|
||||||
"version": "14.2.13",
|
"version": "14.2.14",
|
||||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.13.tgz",
|
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.14.tgz",
|
||||||
"integrity": "sha512-s3lh6K8cbW1h5Nga7NNeXrbe0+2jIIYK9YaA9T7IufDWnZpozdFUp6Hf0d5rNWUKu4fEuSX2rCKlGjCrtylfDw==",
|
"integrity": "sha512-/0hWQfiaD5//LvGNgc8PjvyqV50vGK0cADYzaoOOGN8fxzBn3iAiaq3S0tCRnFBldq0LVveLcxCTi41ZoYgAgg=="
|
||||||
"license": "MIT"
|
|
||||||
},
|
},
|
||||||
"node_modules/@next/swc-darwin-arm64": {
|
"node_modules/@next/swc-darwin-arm64": {
|
||||||
"version": "14.2.13",
|
"version": "14.2.13",
|
||||||
|
@ -6630,6 +6630,11 @@
|
||||||
"react-dom": "^16.8 || ^17 || ^18"
|
"react-dom": "^16.8 || ^17 || ^18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/next/node_modules/@next/env": {
|
||||||
|
"version": "14.2.13",
|
||||||
|
"resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.13.tgz",
|
||||||
|
"integrity": "sha512-s3lh6K8cbW1h5Nga7NNeXrbe0+2jIIYK9YaA9T7IufDWnZpozdFUp6Hf0d5rNWUKu4fEuSX2rCKlGjCrtylfDw=="
|
||||||
|
},
|
||||||
"node_modules/next/node_modules/postcss": {
|
"node_modules/next/node_modules/postcss": {
|
||||||
"version": "8.4.31",
|
"version": "8.4.31",
|
||||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
|
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hookform/resolvers": "^3.6.0",
|
"@hookform/resolvers": "^3.6.0",
|
||||||
"@mapbox/node-pre-gyp": "^1.0.11",
|
"@mapbox/node-pre-gyp": "^1.0.11",
|
||||||
|
"@next/env": "^14.2.14",
|
||||||
"@prisma/client": "^5.15.0",
|
"@prisma/client": "^5.15.0",
|
||||||
"@radix-ui/react-checkbox": "^1.0.4",
|
"@radix-ui/react-checkbox": "^1.0.4",
|
||||||
"@radix-ui/react-context-menu": "^2.2.1",
|
"@radix-ui/react-context-menu": "^2.2.1",
|
||||||
|
|
|
@ -3,7 +3,15 @@ import prisma from 'app/lib/db';
|
||||||
import { jwtVerify, JWTPayload, decodeJwt, SignJWT } from 'jose';
|
import { jwtVerify, JWTPayload, decodeJwt, SignJWT } from 'jose';
|
||||||
import { cookies } from 'next/headers';
|
import { cookies } from 'next/headers';
|
||||||
import { loginSchema, LoginSchema } from 'app/login/schema';
|
import { loginSchema, LoginSchema } from 'app/login/schema';
|
||||||
import { NextResponse } from 'next/server';
|
import { loadEnvConfig } from '@next/env'
|
||||||
|
|
||||||
|
const projectDir = process.cwd()
|
||||||
|
loadEnvConfig(projectDir)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export async function getJWTSecretKey<Uint8Array>() {
|
export async function getJWTSecretKey<Uint8Array>() {
|
||||||
const secret = process.env.JWT_SECRET
|
const secret = process.env.JWT_SECRET
|
||||||
|
|
Loading…
Reference in New Issue