1
0
forked from baron/baron-sso

fix(web): upgrade vite and restore devfront build

- switch adminfront and devfront to vite 8
- fix devfront TypeScript baseline build errors
- require Node.js 24 LTS or newer in package metadata and docs

Co-Authored-By: First Fluke <our.first.fluke@gmail.com>
This commit is contained in:
Lectom C Han
2026-03-30 18:20:46 +09:00
parent d2a4770967
commit e4680b0fe8
11 changed files with 1374 additions and 417 deletions

View File

@@ -13,7 +13,6 @@ export interface UserProfile {
name: string;
phone?: string;
role: string;
phone?: string;
companyCode?: string;
tenantId?: string;
tenant?: Tenant;

View File

@@ -10,6 +10,9 @@ export type ClientSummary = {
status: ClientStatus;
createdAt?: string;
clientSecret?: string;
tokenEndpointAuthMethod?: string;
jwksUri?: string;
jwks?: string | Record<string, unknown>;
redirectUris: string[];
scopes: string[];
};
@@ -71,6 +74,8 @@ export type ClientUpsertRequest = {
grantTypes?: string[];
responseTypes?: string[];
tokenEndpointAuthMethod?: string;
jwksUri?: string;
jwks?: Record<string, unknown>;
metadata?: Record<string, unknown>;
};

View File

@@ -18,18 +18,6 @@ function toBase64Url(base64: string): string {
return base64.replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
}
/**
* Converts a hex string to a URL-safe Base64 string.
*/
function hexToBase64Url(hex: string): string {
const binary = hex
.match(/.{1,2}/g)
?.map((byte) => String.fromCharCode(Number.parseInt(byte, 16)))
.join("");
if (!binary) return "";
return toBase64Url(btoa(binary));
}
/**
* Extracts RSA Modulus (n) and Exponent (e) from a SubjectPublicKeyInfo (PEM).
* This is a simplified parser for common RSA keys.
@@ -37,7 +25,7 @@ function hexToBase64Url(hex: string): string {
export function parsePemToJwk(pem: string): JWK | null {
try {
// Remove headers, footers and whitespace
const base64 = pem
pem
.replace(/-----BEGIN PUBLIC KEY-----/, "")
.replace(/-----END PUBLIC KEY-----/, "")
.replace(/\s/g, "");
@@ -84,8 +72,6 @@ export function parseSshRsaToJwk(sshKey: string): JWK | null {
const eBlob = readBlob();
const nBlob = readBlob();
const toB64Url = (blob: string) => toBase64Url(btoa(blob));
return {
kty: "RSA",
n: semanticsBase64Url(nBlob),