feat: add admin accounts and image templates

This commit is contained in:
inman
2026-07-03 11:25:25 +08:00
parent d98e58adfa
commit c3ea9f0eb1
61 changed files with 7016 additions and 199 deletions

View File

@@ -75,7 +75,8 @@ export async function verifyAuthJwt(token: string, config = getAuthRuntimeConfig
export function createSessionFromClaims(
claims: AuthTokenClaims,
config: AuthRuntimeConfig,
tokenResponseExpiresIn?: number
tokenResponseExpiresIn?: number,
token?: { accessToken?: string; tokenType?: string }
): AuthSession {
const now = Math.floor(Date.now() / 1000);
const jwtExpiry = numberClaim(claims.exp);
@@ -85,7 +86,9 @@ export function createSessionFromClaims(
version: 1,
user: userFromClaims(claims, config),
issuedAt: now,
expiresAt
expiresAt,
accessToken: token?.accessToken,
tokenType: token?.tokenType
};
}