@jskit-ai/auth-provider-oidc-core 0.2.37 → 0.2.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/auth-provider-oidc-core",
3
- "version": "0.2.37",
3
+ "version": "0.2.39",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "jskit test"
@@ -20,8 +20,8 @@
20
20
  "openid-client": "6.8.8"
21
21
  },
22
22
  "devDependencies": {
23
- "@jskit-ai/auth-provider-local-core": "0.2.26",
24
- "@jskit-ai/auth-web": "0.2.34",
23
+ "@jskit-ai/auth-provider-local-core": "0.2.28",
24
+ "@jskit-ai/auth-web": "0.2.35",
25
25
  "oidc-provider": "9.12.2"
26
26
  },
27
27
  "description": "Sign in through any OpenID Connect issuer: self-registration or a static client, app-owned sessions, and back-channel logout.",
@@ -91,7 +91,7 @@
91
91
  }
92
92
  },
93
93
  "peerDependencies": {
94
- "@jskit-ai/auth-core": "0.2.22",
94
+ "@jskit-ai/auth-core": "0.2.23",
95
95
  "@jskit-ai/kernel": "0.2.22"
96
96
  }
97
97
  }
@@ -2,7 +2,7 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@jskit-ai/auth-provider-oidc-core": "0.2.37",
6
- "@jskit-ai/auth-web": "0.2.34"
5
+ "@jskit-ai/auth-provider-oidc-core": "0.2.39",
6
+ "@jskit-ai/auth-web": "0.2.35"
7
7
  }
8
8
  }
@@ -9,9 +9,12 @@ const ACCOUNT = Object.freeze({ sub: "usr_test_ada", email: "ada@example.test",
9
9
  /**
10
10
  * A local OpenID Connect issuer (plain oidc-provider) that signs a fixed test
11
11
  * account in without a form, with registration, back-channel and RP-initiated
12
- * logout enabled. No real provider is ever contacted.
12
+ * logout enabled. No real provider is ever contacted. With `consentPage`, a
13
+ * browser signs in from a page whose Continue button posts the approval, so
14
+ * its way back to the client starts on the issuer's page, as at a real
15
+ * provider, rather than in the redirects of the client's own navigation.
13
16
  */
14
- async function startMockIssuer({ blocked = false, account = ACCOUNT, staticClients = [] } = {}) {
17
+ async function startMockIssuer({ blocked = false, account = ACCOUNT, staticClients = [], consentPage = false } = {}) {
15
18
  const server = http.createServer();
16
19
  server.listen(0, "127.0.0.1");
17
20
  await once(server, "listening");
@@ -61,6 +64,11 @@ async function startMockIssuer({ blocked = false, account = ACCOUNT, staticClien
61
64
  res.end(JSON.stringify({ error: "invalid_redirect_uri", error_description: "This address is blocked by the hub's owner." }));
62
65
  return;
63
66
  }
67
+ if (req.url.startsWith("/interaction/") && consentPage && req.method === "GET") {
68
+ res.setHeader("Content-Type", "text/html; charset=utf-8");
69
+ res.end(`<!doctype html><title>Sign in</title><form method="post"><button>Continue</button></form>`);
70
+ return;
71
+ }
64
72
  if (req.url.startsWith("/interaction/")) {
65
73
  finishInteraction(req, res).catch((error) => {
66
74
  res.statusCode = 500;