Waitlist
Every release of @checodo/better-auth-waitlist, newest first.
@checodo/better-auth-waitlist · Waitlist docs · All plugins
0.5.0
Minor Changes
- 4d87d69: Deleting a user now deletes their waitlist entry, which holds their email address. Before, the entry stayed (marked
registered) until an admin deleted it orretentionremoved it. If you need to keep it, read it in auser.delete.beforedatabase hook first.
0.4.1
Patch Changes
- 7c1dafc: Internal: the shared helper that runs user callbacks can now also report failures (used by the security alerts plugin). No change in behavior.
0.4.0
Minor Changes
-
01f3d0b: Record when an email was confirmed, and clean up expired entries on a schedule.
- New
confirmedAtfield onwaitlistEntry: when the person opened the confirmation link (double opt-in). It staysnullwhen nobody confirmed the email: withconfirmEmail: false, for emails an admin invited directly before they confirmed, and for entries confirmed before this release. - With the audit log, confirmations (
waitlist.confirmed) and people leaving through the link (waitlist.left) are recorded, both with severitylowand no actor.waitlist.leftandwaitlist.entry-deletedare recorded once, also when the same entry is deleted by concurrent requests. - Expired unconfirmed entries are now also deleted in the background on any waitlist request (at most once an hour), not only when someone joins. New server-only
auth.api.deleteExpiredWaitlistEntries()for a cron job, returning{ deleted }. - New
retentionoption:{ rejected, registered }deletes rejected and registered entries after that many days (kept by default), andsweepIntervalsets how often the cleanup runs (seconds, default3600).
Migration required:
confirmedAtis a new optional column. Runnpx auth@latest migrate(orgeneratefor Prisma and Drizzle); existing rows getnull. - New
Patch Changes
-
50f8e3f: Fix two rare outcomes of confirming an email at the same moment as something else changes the entry, and refuse durations no date can hold.
- A confirmation that finds the waitlist over
maxEntrieswhile an admin has just approved or rejected the same entry no longer answersWAITLIST_FULL: the confirmation stands, keeps itsconfirmedAt, and is recorded aswaitlist.confirmed. - A confirmation link whose entry is deleted while it is being confirmed (its link expired and the cleanup removed it) now answers
INVALID_TOKENinstead ofsuccess. confirmationExpiresIn,retention.rejected, andretention.registeredmust be at most 100 years (36,500 days). Larger values put the cleanup's cutoff outside the range of a date, so every cleanup failed.
- A confirmation that finds the waitlist over
0.3.0
Minor Changes
-
daa1c02: Make waitlist state changes safe under concurrent requests. Each transition that sends an email or runs a callback is now a conditional update that only applies while the entry is as it was read:
- Joining again with an unconfirmed email at the same time from several requests renews the confirmation link once and sends one email, so the limit of 4 confirmation emails per address holds.
- Opening a confirmation link several times at once confirms the entry once:
onJoinandautoApproverun once, and only one invite is sent. A confirmation that finds the waitlist full no longer reverts an entry another request has moved on. - Two admins approving or renewing the same entry at once send one invite, whose code is the one stored.
- Rejecting no longer overwrites a sign-up or approval that happened meanwhile.
New error code
ENTRY_CHANGED(409):rejectEntryandcreateInvitereturn it when another request changed the entry first; load it again and retry.approveEntriesskips such entries, like registered ones.
0.2.1
Patch Changes
- 6babf6c: The npm page now links to the plugin's docs on the docs site (
homepageand the README's Documentation link). Each GitHub release now carries the published tarball, its SBOM, and a Sigstore bundle with signed build provenance (gh attestation verify <file> --repo checodo/better-auth-plugins). No code changes.
0.2.0
Minor Changes
- debe1ae: First release: gate sign-ups behind a waitlist with admin approval and invite codes.