mirror of
https://git.suyu.dev/suyu/website.git
synced 2026-01-04 05:34:30 +01:00
fix secrets mess
This commit is contained in:
parent
57e423633c
commit
2442d891b8
6 changed files with 9 additions and 5 deletions
4
src/lib/server/secrets/secrets.example.json
Normal file
4
src/lib/server/secrets/secrets.example.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"PUBLIC_KEY": "-----BEGIN PUBLIC...",
|
||||
"PRIVATE_KEY": "-----BEGIN PRIVATE..."
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import type { IJwtData } from "$types/auth";
|
||||
import type { Role } from "$types/db";
|
||||
import { PUBLIC_KEY } from "../secrets";
|
||||
import { PUBLIC_KEY } from "../secrets/secrets.json";
|
||||
import jwt from "jsonwebtoken";
|
||||
|
||||
export function json<T>(body: T): Response {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { userRepo } from "$lib/server/repo";
|
||||
import type { SuyuUser } from "$lib/server/schema";
|
||||
import { PUBLIC_KEY } from "$lib/server/secrets";
|
||||
import { PUBLIC_KEY } from "$lib/server/secrets/secrets.json";
|
||||
import type { IJwtData } from "$types/auth";
|
||||
import cookie from "cookie";
|
||||
import jwt from "jsonwebtoken";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue