forked from zombieb/galvanic-corrosion-rewrite
new things.
This commit is contained in:
@@ -6,6 +6,7 @@ import { sign } from "@hono/hono/jwt";
|
||||
import { CachedLogin, DbCachedLogin, PlatformMask, PlatformType, TokenFormat, TokenType } from "./types.ts";
|
||||
import type Profile from "../profiles/profile.ts";
|
||||
import { getNetConfig } from "../../net.ts";
|
||||
import { env } from "../../env.ts";
|
||||
|
||||
export const steamAuthTicketSchema = z.object({
|
||||
Ticket: z.string().min(256),
|
||||
@@ -23,7 +24,7 @@ export class PlatformsManager extends ServerContentBase {
|
||||
}
|
||||
|
||||
async getToken(prof: Profile, type: TokenType) {
|
||||
const secret = Deno.env.get('SECRET');
|
||||
const secret = env["SECRET"];
|
||||
if (!secret) throw new Error("No SECRET in env. Did you forget to set it?");
|
||||
const exp = type == TokenType.Access ? Math.round(Date.now() / 1000) + 21_600 : Math.round(Date.now() / 1000) + 31_556_952;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user