fix secrets mess
This commit is contained in:
parent
57e423633c
commit
2442d891b8
6 changed files with 9 additions and 5 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -10,4 +10,4 @@ vite.config.js.timestamp-*
|
|||
vite.config.ts.timestamp-*
|
||||
ssl
|
||||
*.sqlite
|
||||
src/lib/server/secrets
|
||||
src/lib/server/secrets/secrets.json
|
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";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { PRIVATE_KEY } from "$lib/server/secrets/index.js";
|
||||
import { PRIVATE_KEY } from "$lib/server/secrets/secrets.json";
|
||||
import { useAuth } from "$lib/util/api/index.js";
|
||||
import jwt from "jsonwebtoken";
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Room, RoomManager } from "$lib/server/class/Room";
|
||||
import { userRepo } from "$lib/server/repo/index.js";
|
||||
import { SuyuUser } from "$lib/server/schema";
|
||||
import { PUBLIC_KEY } from "$lib/server/secrets/index.js";
|
||||
import { PUBLIC_KEY } from "$lib/server/secrets/secrets.json";
|
||||
import { json } from "$lib/server/util";
|
||||
import type { IJwtData } from "$types/auth.js";
|
||||
import type { IRoom, LobbyResponse } from "$types/rooms";
|
||||
|
|
Loading…
Reference in a new issue