@jskit-ai/auth-provider-oidc-core 0.1.0 → 0.1.2

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.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "node --test --test-concurrency=1"
@@ -19,8 +19,8 @@
19
19
  "openid-client": "6.8.8"
20
20
  },
21
21
  "devDependencies": {
22
- "@jskit-ai/auth-provider-local-core": "0.1.146",
23
- "@jskit-ai/auth-web": "0.1.246",
22
+ "@jskit-ai/auth-provider-local-core": "0.1.147",
23
+ "@jskit-ai/auth-web": "0.1.248",
24
24
  "oidc-provider": "9.12.2"
25
25
  },
26
26
  "description": "Sign in through any OpenID Connect issuer: self-registration or a static client, app-owned sessions, and back-channel logout.",
@@ -90,7 +90,7 @@
90
90
  }
91
91
  },
92
92
  "peerDependencies": {
93
- "@jskit-ai/auth-core": "0.1.243",
94
- "@jskit-ai/kernel": "0.1.245"
93
+ "@jskit-ai/auth-core": "0.1.244",
94
+ "@jskit-ai/kernel": "0.1.246"
95
95
  }
96
96
  }
@@ -2,7 +2,7 @@
2
2
  "private": true,
3
3
  "type": "module",
4
4
  "dependencies": {
5
- "@jskit-ai/auth-provider-oidc-core": "0.1.0",
6
- "@jskit-ai/auth-web": "0.1.246"
5
+ "@jskit-ai/auth-provider-oidc-core": "0.1.2",
6
+ "@jskit-ai/auth-web": "0.1.248"
7
7
  }
8
8
  }
@@ -38,7 +38,11 @@ test("RP 6: a callback with the wrong state is rejected", async (t) => {
38
38
  await assert.rejects(rp.service.oauthComplete(input, requestAt()), ATTEMPT_MISMATCH, "no attempt cookie in this browser");
39
39
  const other = await rp.service.oauthStart({ provider: "oidc" }, requestAt());
40
40
  await assert.rejects(rp.service.oauthComplete(input, requestAt(APP_ORIGIN, { jskit_oidc_attempt: other.attempt })), ATTEMPT_MISMATCH);
41
- const forged = `${request.cookies.jskit_oidc_attempt.slice(0, -2)}AA`;
41
+ // Change one fully significant character of the authentication tag; trailing
42
+ // base64url characters carry padding bits and can decode to the same tag.
43
+ const sealed = request.cookies.jskit_oidc_attempt;
44
+ const at = sealed.lastIndexOf(".") + 1;
45
+ const forged = `${sealed.slice(0, at)}${sealed[at] === "A" ? "B" : "A"}${sealed.slice(at + 1)}`;
42
46
  await assert.rejects(rp.service.oauthComplete(input, requestAt(APP_ORIGIN, { jskit_oidc_attempt: forged })), ATTEMPT_MISMATCH);
43
47
  });
44
48