npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sveinssons-dev/form-kit-redis

v2.0.0

Published

Redis-backed nonce and rate-limit stores for Sveinssons Form Kit.

Downloads

284

Readme

@sveinssons-dev/form-kit-redis

Redis-backed nonce and rate-limit stores for Sveinssons Form Kit.

npm install @sveinssons-dev/form-kit-redis

Public exports include RedisNonceStore, RedisRateLimitStore, namespace helpers, and the driver-neutral RedisStoreClient contract. Requires Node.js 24.11.0 or later and an injected Redis client; pair it with form-kit-server.

Nonce store — authority and requirements

RedisNonceStore uses an atomic Lua script (EVAL) that reads Redis TIME and performs SET NX PXAT in a single atomic operation. Redis 7+ is required for effects-replication semantics (TIME in a writing script).

Authority change (v2.0.0): Nonce expiry is now determined by Redis TIME, not by the calling application's clock. The clock option on RedisNonceStoreOptions is deprecated and has no effect on expiry decisions; it will be removed in a future release.

Operational requirements for the nonce replay guarantee:

  • Use maxmemory-policy noeviction (or a provider-documented equivalent) so that an out-of-memory condition errors writes rather than silently evicting live nonce claims.
  • One authoritative Redis primary per security namespace. Active-active multi-master and eventual-consistency topologies are not supported.
  • No authority clock discontinuity (no forward jump followed by backward reset) during any live nonce's validity interval.
  • If Redis state is lost or an unsafe failover occurs, recover in this order: (1) pause new admissions; (2) terminate or drain old in-flight workers and any queued/delayed commands so an already-verified request cannot complete a late write; (3) invalidate outstanding tokens; then (4) establish a fresh authority and resume. Signing-secret rotation alone does not stop a request that an old worker has already verified — it must be combined with draining that in-flight work. Do not assume missing keys are unclaimed.
  • Application clocks should be within 1,000 ms of Redis time (NTP-synchronized) for token minting, future-skew, and minimum-completion timing, even though nonce expiry itself is now authority-controlled.

Not guaranteed without the above conditions: This library cannot detect eviction, replication loss, or clock discontinuity from within a request. Do not claim unconditional replay protection without verifying the operational contract.

Source is maintained in a private repository. Proprietary software; see LICENSE.