@getstrata/core 2.2.30 → 2.2.32

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
@@ -1,5 +1,13 @@
1
1
  # @getstrata/core changelog
2
2
 
3
+ ## 2.2.32
4
+
5
+ Generated JSON and HTML email verification now atomically consumes the one-time link with the account update and immediate observers, including SQLite/non-RLS apps. Failed verification remains retryable. Adds actual signed HTTP rollback, purpose/expiry/admission, concurrency and replay regressions while preserving existing response contracts.
6
+
7
+ ## 2.2.31
8
+
9
+ Preserve JWT issuance precision across millisecond revocation cutoffs without changing expiration. Generated MFA setup rejects stale concurrent state changes and atomically commits credential revocation in SQLite/non-RLS as well as Postgres RLS. Adds real HTTP initial/replacement races, revocation rollback and withheld-success recovery regressions; intentional fresh replacement remains supported.
10
+
3
11
  ## 2.2.30
4
12
 
5
13
  Basic authentication resolution is reused only within the same Request and unchanged credentials, preventing middleware/controller lookups from consuming MFA recovery proofs twice. Adds real HTTP replay/concurrency and credential/guard invalidation regressions.
@@ -124,11 +124,11 @@ function signaturesMatch(left, right) {
124
124
  return timingSafeEqual(leftBuffer, rightBuffer);
125
125
  }
126
126
  function signJwt(payload, options = {}) {
127
- const now = Math.floor(Date.now() / 1000);
127
+ const issuedAt = Date.now() / 1000;
128
128
  const body = {
129
129
  ...payload,
130
- iat: now,
131
- exp: now + jwtTtlSeconds(options.ttlSeconds)
130
+ iat: issuedAt,
131
+ exp: Math.floor(issuedAt) + jwtTtlSeconds(options.ttlSeconds)
132
132
  };
133
133
  const header = encodeJson({ alg: "HS256", typ: "JWT" });
134
134
  const data = encodeJson(body);
@@ -292,11 +292,11 @@ function signaturesMatch(left, right) {
292
292
  return timingSafeEqual(leftBuffer, rightBuffer);
293
293
  }
294
294
  function signJwt(payload, options = {}) {
295
- const now = Math.floor(Date.now() / 1000);
295
+ const issuedAt = Date.now() / 1000;
296
296
  const body = {
297
297
  ...payload,
298
- iat: now,
299
- exp: now + jwtTtlSeconds(options.ttlSeconds)
298
+ iat: issuedAt,
299
+ exp: Math.floor(issuedAt) + jwtTtlSeconds(options.ttlSeconds)
300
300
  };
301
301
  const header = encodeJson({ alg: "HS256", typ: "JWT" });
302
302
  const data = encodeJson(body);
package/dist/index.js CHANGED
@@ -1920,11 +1920,11 @@ function signaturesMatch(left, right) {
1920
1920
  return timingSafeEqual2(leftBuffer, rightBuffer);
1921
1921
  }
1922
1922
  function signJwt(payload, options = {}) {
1923
- const now = Math.floor(Date.now() / 1000);
1923
+ const issuedAt = Date.now() / 1000;
1924
1924
  const body = {
1925
1925
  ...payload,
1926
- iat: now,
1927
- exp: now + jwtTtlSeconds(options.ttlSeconds)
1926
+ iat: issuedAt,
1927
+ exp: Math.floor(issuedAt) + jwtTtlSeconds(options.ttlSeconds)
1928
1928
  };
1929
1929
  const header = encodeJson({ alg: "HS256", typ: "JWT" });
1930
1930
  const data = encodeJson(body);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getstrata/core",
3
- "version": "2.2.30",
3
+ "version": "2.2.32",
4
4
  "description": "Strata Bun framework public API",
5
5
  "type": "module",
6
6
  "license": "MIT",