coyotte508 commited on
Commit
f878d91
·
1 Parent(s): aef5046

fix client open id

Browse files
src/lib/server/auth.ts CHANGED
@@ -264,7 +264,7 @@ async function getOIDCClient(settings: OIDCSettings, url: URL): Promise<BaseClie
264
  };
265
 
266
  if (OIDConfig.CLIENT_ID === "__CIMD__") {
267
- OIDConfig.CLIENT_ID = new URL(
268
  `${base}/.well-known/oauth-cimd`,
269
  config.PUBLIC_ORIGIN || url.origin
270
  ).toString();
 
264
  };
265
 
266
  if (OIDConfig.CLIENT_ID === "__CIMD__") {
267
+ client_config.client_id = new URL(
268
  `${base}/.well-known/oauth-cimd`,
269
  config.PUBLIC_ORIGIN || url.origin
270
  ).toString();
src/routes/.well-known/oauth-cimd/+server.ts CHANGED
@@ -6,9 +6,12 @@ export const GET = ({ url }) => {
6
  return new Response("Client ID not found", { status: 404 });
7
  }
8
  if (OIDConfig.CLIENT_ID !== "__CIMD__") {
9
- return new Response("Client ID is manually set to something other than '__CIMD__'", {
10
- status: 404,
11
- });
 
 
 
12
  }
13
  return new Response(
14
  JSON.stringify({
 
6
  return new Response("Client ID not found", { status: 404 });
7
  }
8
  if (OIDConfig.CLIENT_ID !== "__CIMD__") {
9
+ return new Response(
10
+ `Client ID is manually set to something other than '__CIMD__': ${OIDConfig.CLIENT_ID}`,
11
+ {
12
+ status: 404,
13
+ }
14
+ );
15
  }
16
  return new Response(
17
  JSON.stringify({