Files
Bereket Engida 90127ff2a1 fix(core): make consumeOne and incrementOne optional on custom adapters
1.7.0 made both methods required on CustomAdapter and removed the
factory fallback, so a custom adapter written for 1.6 type-checks
against nothing and throws at request time on the first OTP, magic
link, password reset, or two-factor attempt.

Restore the fallbacks. consumeOne without a native implementation runs
findOne then an id-guarded deleteMany and wins only when exactly one
row was deleted. incrementOne runs a bounded compare-and-swap loop:
findOne, then updateMany guarded on the id and the counter values just
read, retried when a concurrent writer changed the row first. Both are
single guarded statements per attempt, so they stay atomic across
processes without transactions.
2026-09-03 22:14:45 -07:00
..

Changesets

Hello and welcome! This folder has been automatically generated by @changesets/cli, a build tool that works with multi-package repos, or single-package repos to help you version and publish your code. You can find the full documentation for it in our repository.

We have a quick list of common questions to get you started engaging with this project in our documentation.