mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
feat: using private key from environment
This commit is contained in:
parent
02013bc6be
commit
cfd8d4cc5e
@ -1,8 +1,7 @@
|
||||
import * as fs from 'fs'
|
||||
import * as jwt from 'jsonwebtoken'
|
||||
|
||||
const publicPem = fs.readFileSync('./public.pem')
|
||||
const privateKey = fs.readFileSync('./private.key')
|
||||
const publicPem = process.env.PUBLIC_PEM
|
||||
const privateKey = process.env.PRIVATE_KEY
|
||||
|
||||
export function sign(payload: string | Record<string, unknown>, options?: JWTSignOption): string | null {
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user