OIDC & store fixes (#358)
* fix: typos * fix: platform filtering * feat: fix tags and create option
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user