@orangecheck/me-client 0.53.1 → 0.53.3

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/CHANGELOG.md CHANGED
@@ -8,6 +8,24 @@ and [Semantic Versioning](https://semver.org/). Wire-format / canonical-message
8
8
  changes are coordinated via the relevant `oc-*-protocol` spec repo's CHANGELOG;
9
9
  this file tracks the package's TS / Node / runtime API surface.
10
10
 
11
+ ## [0.53.3] — 2026-10-26
12
+
13
+ ### Fixed
14
+
15
+ - The webhook verifier and `verifyActivityAttestation` look a `kid` up only
16
+ among the fetched key set's own entries. Any string is a usable `kid`, and a
17
+ `kid` that names no key in the set is refused.
18
+
19
+ ## [0.53.2] — 2026-10-26
20
+
21
+ ### Fixed
22
+
23
+ - **`/button` and `/react` carry their own types.** Their declaration files
24
+ named `@orangecheck/mark` for `MarkVariant`, but mark is bundled into the
25
+ code and is not a dependency, so installing this package left that import
26
+ unresolved: `MarkVariant` read as `any`, or TS2307 without `skipLibCheck`.
27
+ The type is now written into the declarations. The code is unchanged.
28
+
11
29
  ## [0.53.1] — 2026-10-25
12
30
 
13
31
  ### Changed
package/dist/button.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { MarkVariant } from '@orangecheck/mark';
2
- export { MarkVariant } from '@orangecheck/mark';
3
1
  import { OcPopupResult, OcPopupOutcome, SignInWithOcOptions } from './popup.mjs';
4
2
 
3
+ type MarkVariant = 'mono' | 'brand' | 'tile';
4
+
5
5
  declare const SIGN_IN_LABELS: {
6
6
  readonly signIn: "Sign in with orangecheck";
7
7
  readonly continue: "Continue with orangecheck";
@@ -36,4 +36,4 @@ declare function checkSignInOptions(options: EnhanceSignInButtonOptions): Checke
36
36
  declare function holdWidth(button: HTMLElement): () => void;
37
37
  declare function enhanceSignInButton(button: HTMLButtonElement, options: EnhanceSignInButtonOptions): () => void;
38
38
 
39
- export { type CheckedSignInOptions, type EnhanceSignInButtonOptions, OUTCOME_COPY, OcPopupOutcome, OcPopupResult, SIGN_IN_BUSY_LABEL, SIGN_IN_LABELS, type SignInAppearance, type SignInLabel, SignInWithOcOptions, checkSignInOptions, enhanceSignInButton, holdWidth };
39
+ export { type CheckedSignInOptions, type EnhanceSignInButtonOptions, type MarkVariant, OUTCOME_COPY, OcPopupOutcome, OcPopupResult, SIGN_IN_BUSY_LABEL, SIGN_IN_LABELS, type SignInAppearance, type SignInLabel, SignInWithOcOptions, checkSignInOptions, enhanceSignInButton, holdWidth };
package/dist/button.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { MarkVariant } from '@orangecheck/mark';
2
- export { MarkVariant } from '@orangecheck/mark';
3
1
  import { OcPopupResult, OcPopupOutcome, SignInWithOcOptions } from './popup.js';
4
2
 
3
+ type MarkVariant = 'mono' | 'brand' | 'tile';
4
+
5
5
  declare const SIGN_IN_LABELS: {
6
6
  readonly signIn: "Sign in with orangecheck";
7
7
  readonly continue: "Continue with orangecheck";
@@ -36,4 +36,4 @@ declare function checkSignInOptions(options: EnhanceSignInButtonOptions): Checke
36
36
  declare function holdWidth(button: HTMLElement): () => void;
37
37
  declare function enhanceSignInButton(button: HTMLButtonElement, options: EnhanceSignInButtonOptions): () => void;
38
38
 
39
- export { type CheckedSignInOptions, type EnhanceSignInButtonOptions, OUTCOME_COPY, OcPopupOutcome, OcPopupResult, SIGN_IN_BUSY_LABEL, SIGN_IN_LABELS, type SignInAppearance, type SignInLabel, SignInWithOcOptions, checkSignInOptions, enhanceSignInButton, holdWidth };
39
+ export { type CheckedSignInOptions, type EnhanceSignInButtonOptions, type MarkVariant, OUTCOME_COPY, OcPopupOutcome, OcPopupResult, SIGN_IN_BUSY_LABEL, SIGN_IN_LABELS, type SignInAppearance, type SignInLabel, SignInWithOcOptions, checkSignInOptions, enhanceSignInButton, holdWidth };
package/dist/index.js CHANGED
@@ -995,11 +995,11 @@ async function fetchJwks(issuer, ttlMs, maxStaleMs = DEFAULT_MAX_STALE_MS) {
995
995
  if (!json || !Array.isArray(json.keys)) {
996
996
  throw new Error(`JWKS at ${url} did not return {keys:[\u2026]}`);
997
997
  }
998
- const keys = {};
998
+ const keys = /* @__PURE__ */ new Map();
999
999
  for (const k of json.keys) {
1000
1000
  if (typeof k.kid !== "string") continue;
1001
1001
  try {
1002
- keys[k.kid] = await importJWK(k, "EdDSA");
1002
+ keys.set(k.kid, await importJWK(k, "EdDSA"));
1003
1003
  } catch {
1004
1004
  }
1005
1005
  }
@@ -1074,11 +1074,11 @@ async function verify2(rawBody, sigHex, kid, options = {}) {
1074
1074
  const maxStale = options.jwksMaxStaleMs ?? DEFAULT_MAX_STALE_MS;
1075
1075
  try {
1076
1076
  let entry = await fetchJwks(issuer, ttl, maxStale);
1077
- key = entry.keys[kid];
1077
+ key = entry.keys.get(kid);
1078
1078
  if (!key && Date.now() - (lastForcedRefresh.get(issuer) ?? 0) >= FORCED_REFRESH_MIN_INTERVAL_MS) {
1079
1079
  lastForcedRefresh.set(issuer, Date.now());
1080
1080
  entry = await fetchJwks(issuer, 0, maxStale);
1081
- key = entry.keys[kid];
1081
+ key = entry.keys.get(kid);
1082
1082
  }
1083
1083
  } catch (err) {
1084
1084
  return { ok: false, reason: `jwks unavailable: ${err.message}` };
@@ -1267,11 +1267,11 @@ async function fetchEnvelopeJwks(issuer, ttlMs, maxStaleMs = DEFAULT_MAX_STALE_M
1267
1267
  if (!json || !Array.isArray(json.keys)) {
1268
1268
  throw new Error(`envelope JWKS at ${url} did not return {keys:[\u2026]}`);
1269
1269
  }
1270
- const keys = {};
1270
+ const keys = /* @__PURE__ */ new Map();
1271
1271
  for (const k of json.keys) {
1272
1272
  if (typeof k.kid !== "string") continue;
1273
1273
  try {
1274
- keys[k.kid] = await importJWK(k, "EdDSA");
1274
+ keys.set(k.kid, await importJWK(k, "EdDSA"));
1275
1275
  } catch {
1276
1276
  }
1277
1277
  }
@@ -1449,11 +1449,11 @@ async function verifyActivityAttestation(bundle, options = {}) {
1449
1449
  const maxStale = options.jwksMaxStaleMs ?? DEFAULT_MAX_STALE_MS2;
1450
1450
  try {
1451
1451
  let entry = await fetchEnvelopeJwks(issuer, ttl, maxStale);
1452
- key = entry.keys[bundle.kid] ?? null;
1452
+ key = entry.keys.get(bundle.kid) ?? null;
1453
1453
  if (!key && Date.now() - (lastForcedRefresh2.get(issuer) ?? 0) >= FORCED_REFRESH_MIN_INTERVAL_MS2) {
1454
1454
  lastForcedRefresh2.set(issuer, Date.now());
1455
1455
  entry = await fetchEnvelopeJwks(issuer, 0, maxStale);
1456
- key = entry.keys[bundle.kid] ?? null;
1456
+ key = entry.keys.get(bundle.kid) ?? null;
1457
1457
  }
1458
1458
  checks.push({
1459
1459
  ok: !!key,