OIDC & store fixes (#358)

* fix: typos

* fix: platform filtering

* feat: fix tags and create option
This commit is contained in:
DecDuck
2026-02-26 22:15:19 +00:00
committed by GitHub
parent 768a4e2414
commit 7fa02c57d1
6 changed files with 138 additions and 27 deletions
+23 -13
View File
@@ -53,24 +53,34 @@ export default defineEventHandler(async (h3) => {
: undefined;
const platformFilter = filterPlatforms
? ({
versions: {
some: {
launches: {
OR: [
{
versions: {
some: {
platform: {
in: filterPlatforms,
},
},
},
setups: {
some: {
platform: {
in: filterPlatforms,
setups: {
some: {
platform: {
in: filterPlatforms,
},
},
},
},
},
},
},
{
versions: {
some: {
launches: {
some: {
platform: {
in: filterPlatforms,
},
},
},
},
},
},
],
} satisfies Prisma.GameWhereInput)
: undefined;
+2 -2
View File
@@ -153,14 +153,14 @@ export class OIDCManager {
this.JWKS = jose.createRemoteJWKSet(this.oidcConfiguration.jwks_uri);
this.redirectUrl = new URL(
`${this.externalUrl.toString()}api/v1/auth/odic/callback`,
`${this.externalUrl.toString()}api/v1/auth/oidc/callback`,
);
}
static async create() {
if (!systemConfig.shouldOidcRequireHttps()) {
console.warn(
"Disabling HTTPS requirement for ODIC provider, not recommened in production enviroments",
"Disabling HTTPS requirement for OIDC provider, not recommened in production enviroments",
);
}
+6 -6
View File
@@ -12,7 +12,7 @@ class SystemConfig {
);
private dropVersion: string;
private gitRef: string;
private odicRequireHttps;
private oidcRequireHttps;
private checkForUpdates = getUpdateCheckConfig();
@@ -22,14 +22,14 @@ class SystemConfig {
this.dropVersion = config.dropVersion;
this.gitRef = config.gitRef;
const odicRequireHttps = process.env.OIDC_REQUIRE_HTTPS as
const oidcRequireHttps = process.env.OIDC_REQUIRE_HTTPS as
| string
| undefined;
// default to true if not set
this.odicRequireHttps =
odicRequireHttps !== undefined &&
odicRequireHttps.toLocaleLowerCase() === "false"
this.oidcRequireHttps =
oidcRequireHttps !== undefined &&
oidcRequireHttps.toLocaleLowerCase() === "false"
? false
: true;
}
@@ -64,7 +64,7 @@ class SystemConfig {
// if oidc should require https for endpoints
shouldOidcRequireHttps() {
return this.odicRequireHttps;
return this.oidcRequireHttps;
}
}