@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/dist/react.d.mts CHANGED
@@ -1,8 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ButtonHTMLAttributes } from 'react';
3
3
  import { EnhanceSignInButtonOptions } from './button.mjs';
4
- export { OUTCOME_COPY, SIGN_IN_BUSY_LABEL, SIGN_IN_LABELS, SignInAppearance, SignInLabel } from './button.mjs';
5
- export { MarkVariant } from '@orangecheck/mark';
4
+ export { MarkVariant, OUTCOME_COPY, SIGN_IN_BUSY_LABEL, SIGN_IN_LABELS, SignInAppearance, SignInLabel } from './button.mjs';
6
5
  export { OcPopupOutcome, OcPopupResult } from './popup.mjs';
7
6
 
8
7
  type SignInWithOrangecheckProps = EnhanceSignInButtonOptions & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'children' | 'type'>;
package/dist/react.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ButtonHTMLAttributes } from 'react';
3
3
  import { EnhanceSignInButtonOptions } from './button.js';
4
- export { OUTCOME_COPY, SIGN_IN_BUSY_LABEL, SIGN_IN_LABELS, SignInAppearance, SignInLabel } from './button.js';
5
- export { MarkVariant } from '@orangecheck/mark';
4
+ export { MarkVariant, OUTCOME_COPY, SIGN_IN_BUSY_LABEL, SIGN_IN_LABELS, SignInAppearance, SignInLabel } from './button.js';
6
5
  export { OcPopupOutcome, OcPopupResult } from './popup.js';
7
6
 
8
7
  type SignInWithOrangecheckProps = EnhanceSignInButtonOptions & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'children' | 'type'>;
package/dist/server.js CHANGED
@@ -330,11 +330,11 @@ async function fetchEnvelopeJwks(issuer, ttlMs, maxStaleMs = DEFAULT_MAX_STALE_M
330
330
  if (!json || !Array.isArray(json.keys)) {
331
331
  throw new Error(`envelope JWKS at ${url} did not return {keys:[\u2026]}`);
332
332
  }
333
- const keys = {};
333
+ const keys = /* @__PURE__ */ new Map();
334
334
  for (const k of json.keys) {
335
335
  if (typeof k.kid !== "string") continue;
336
336
  try {
337
- keys[k.kid] = await importJWK(k, "EdDSA");
337
+ keys.set(k.kid, await importJWK(k, "EdDSA"));
338
338
  } catch {
339
339
  }
340
340
  }
@@ -512,11 +512,11 @@ async function verifyActivityAttestation(bundle, options = {}) {
512
512
  const maxStale = options.jwksMaxStaleMs ?? DEFAULT_MAX_STALE_MS;
513
513
  try {
514
514
  let entry = await fetchEnvelopeJwks(issuer, ttl, maxStale);
515
- key = entry.keys[bundle.kid] ?? null;
515
+ key = entry.keys.get(bundle.kid) ?? null;
516
516
  if (!key && Date.now() - (lastForcedRefresh.get(issuer) ?? 0) >= FORCED_REFRESH_MIN_INTERVAL_MS) {
517
517
  lastForcedRefresh.set(issuer, Date.now());
518
518
  entry = await fetchEnvelopeJwks(issuer, 0, maxStale);
519
- key = entry.keys[bundle.kid] ?? null;
519
+ key = entry.keys.get(bundle.kid) ?? null;
520
520
  }
521
521
  checks.push({
522
522
  ok: !!key,