Adds a sign-up flow to Payload with four modes chosen in a settings global. Requests are verified by email, then wait as disabled accounts until staff approve or decline them in the admin. The request form gives the same answer for every address, so it does not reveal which addresses have accounts. Requires Payload 3.80 or later, an access.manage function, and a database with transactions such as MongoDB on a replica set.
Sign-up for Payload: open, approval, invite-only or closed, switched in the admin. Requests are verified by email and wait as disabled accounts for an approve or decline, with no account enumeration.
Installation
npm i @extantape/payload-plugin-signup0
Stars
0
Forks
1
Open Issues
3 days ago
Last Updated
819
Weekly Downloads
v0.5.0
npm Version
202.7 KB
Unpacked Size
0
Dependencies
00 since Nov 8
| Date | Stars |
|---|---|
| Dec 6, 2026 | 0 |
| Dec 5, 2026 | 0 |
| Dec 4, 2026 | 0 |
| Dec 3, 2026 | 0 |
| Dec 2, 2026 | 0 |
| Dec 1, 2026 | 0 |
| Nov 30, 2026 | 0 |
| Nov 29, 2026 | 0 |
| Nov 28, 2026 | 0 |
| Nov 27, 2026 | 0 |
| Nov 26, 2026 | 0 |
| Nov 25, 2026 | 0 |
| Nov 24, 2026 | 0 |
| Nov 23, 2026 | 0 |
| Nov 22, 2026 | 0 |
| Nov 21, 2026 | 0 |
| Nov 20, 2026 | 0 |
| Nov 19, 2026 | 0 |
| Nov 18, 2026 | 0 |
| Nov 17, 2026 | 0 |
| Nov 16, 2026 | 0 |
| Nov 15, 2026 | 0 |
| Nov 14, 2026 | 0 |
| Nov 13, 2026 | 0 |
| Nov 12, 2026 | 0 |
| Nov 11, 2026 | 0 |
| Nov 10, 2026 | 0 |
| Nov 9, 2026 | 0 |
| Nov 8, 2026 | 0 |
813+813 since Nov 12
| Date | Weekly downloads |
|---|---|
| Dec 6, 2026 | 813 |
| Dec 5, 2026 | 954 |
| Dec 4, 2026 | 767 |
| Dec 3, 2026 | 755 |
| Dec 2, 2026 | 717 |
| Dec 1, 2026 | 524 |
| Nov 30, 2026 | 224 |
| Nov 29, 2026 | 202 |
| Nov 28, 2026 | 20 |
| Nov 27, 2026 | 23 |
| Nov 26, 2026 | 18 |
| Nov 25, 2026 | 22 |
| Nov 24, 2026 | 29 |
| Nov 23, 2026 | 45 |
| Nov 22, 2026 | 262 |
| Nov 21, 2026 | 259 |
| Nov 20, 2026 | 254 |
| Nov 19, 2026 | 254 |
| Nov 18, 2026 | 249 |
| Nov 17, 2026 | 238 |
| Nov 16, 2026 | 221 |
| Nov 15, 2026 | 0 |
| Nov 14, 2026 | 210 |
| Nov 13, 2026 | 0 |
| Nov 12, 2026 | 0 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/1453471434-root)<a href="https://payloaddirectory.dev/plugins/1453471434-root"><img src="https://payloaddirectory.dev/badge/1453471434-root.svg" alt="Payload Directory"></a>README
Sign-up for Payload: open, approval, invite-only or closed, switched in the admin. Requests are verified by email and wait as disabled accounts for an approve or decline. The request form is built not to tell whether an address has an account; its limits are below.
Status: 0.5.0 is the latest release, on npm as @extantape/payload-plugin-signup. It changes existing behavior for every site, so read Changes to existing behavior before upgrading: transactions are required unless a site opts out, onApprove runs before the account is activated, the client address is read from headers only when the site says how, and staff notices are capped. A site on 0.2.0 should also follow Upgrading from 0.2.0. 0.4.0 adds automatic approval in approval mode (autoApprove), a staff notice (notifyStaff) and sign-in help (signInHelp). 310 tests pass against a real MongoDB (in memory, single-node replica set) on Payload 3.92. Some failures in those tests are stand-ins: a read or a write made to fail. An independent security read of 0.1.0 found two problems before release, both fixed and tested (see docs/decisions.md). None of the plugin has run on a real site or been used from a real sign-in form, and no real email has been sent: the tests capture email. 0.5.0 adds afterConfirm, holdAddress, resendSignup (the function and its endpoint), linkHours, the request's locale and site in emails and notices, an existing-account email for waiting accounts, and recentFailureCount. The admin button for resending is built and has 12 jsdom tests, but it has not run in a real Payload admin: see Sending a new link. Integration into a real site is next.
SIGNUP_MODE (or the forceMode option) locks the mode from configuration. Anything unreadable or unknown counts as closed.checks, don't let a check look the address up, don't give your fields validators or database rules that depend on what's already stored, and don't let a hook of yours on signup-requests throw. The check of a request's email and details doesn't change or roll back your own transaction. The save can, as the next point says.submitSignup throws as the whole transaction lost. If the real save fails there, Payload rolls back the transaction, including your earlier work in it. A later commit can appear to succeed with that work gone.signup-requests can be unique. The plugin throws at startup if any field there has unique, or any entry in indexes does, including ones another plugin adds. It checks again for each sign-up request that gets past the mode, the human check and the site and address limits, including on a site started without onInit. Don't enforce uniqueness with your own validator or hook either. On MongoDB it also reads the collection's real indexes, at startup and again in that same check. If any index besides _id is unique, or is being made unique (prepareUnique), the site won't start, and a running one answers each request that reaches the check with a 500 and saves nothing. It does the same if it can't read the list, so the database user needs listIndexes, which MongoDB's read and readWrite roles include. A collection that doesn't exist yet is fine. With disableDBConnect and onInit on, startup fails after about 10 seconds (not tested). The check adds one database read to each request that reaches it (about 0.2 ms against a local test database, and about one round trip over a network). On other databases, SQL included, the plugin doesn't read indexes, so keeping them free of unique ones is up to you. A request there can get 503 checkFailed while a unique index is in place, and the index still has to be removed.answerAfterMs, 2 seconds by default), counted from after your checks. The email is sent in the background and the answer never waits for it. See Answer time and serverless hosts.afterConfirm, optional): your function can name a page on your own site to send the person to. See After confirming.holdAddress, optional): an address you won't take gets the same answer as any other, and nothing is sent or stored. See Holding an address.linkHours sets how long a link works. See Sending a new link.onApprove (roles, memberships) while the account still can't sign in, then activates it and emails "You're in". Declining deletes the account, which never signed in, and sends a polite email with your optional note. If onApprove fails, nothing changes and no email goes out.autoApprove, optional), in approval mode. Once the person has confirmed, your function is asked about the waiting request and its account. If it answers exactly true, the request is approved through the same save staff make: the account is activated, onApprove runs, "You're in" goes out, and the decision time is kept with Decided by left empty. Any other answer leaves the request waiting for staff, and so does a thrown error, an account that isn't there and waiting, or an approval that doesn't go through. A request that a check flagged is never put to your function. See Automatic approval and the staff notice.notifyStaff, optional) when something is left for staff: a confirmed request that wasn't approved automatically, or a new sign-in help request. A request approved automatically, or in open mode, sends staff nothing.signInHelp, optional, off by default). Each failed sign-in through Payload's REST login is recorded against the address that was typed, whether or not an account has it. Only a keyed hash of the address, the kind and the time are stored, for 7 days. From that record the plugin answers two questions for your sign-in form: whether a try should pass an extra check of yours first (needsStepUp), and whether to offer help (needsSignInHelp). A help request is kept for managers only when the typed address would be offered help. The plugin locks no accounts. See Sign-in help.answers, such as a birth month and year) are never stored. A check that breaks refuses the request. See Checks.confirmChecks, optional): run when the person confirms, before the account is made, with the stored details and flag but never the check-only answers. A refusal declines the request; a check that breaks refuses for now and the link still works later.clientAddress. Without an address, the per-address limits (sign-up, confirm and help requests) are skipped and the site-wide ones still hold. Behind one proxy that sets or overwrites x-real-ip on every request (Vercel does), pass the exported addressFromProxyHeaders, which reads x-real-ip, else the last x-forwarded-for entry. Behind several proxies or a CDN with its own header, pass a function that reads the header your host vouches for.verifyHuman (Turnstile or similar) as well.allowWithoutTransactions: true. Without them, the account is activated only after the request is saved as approved, and if activating fails, the account and the request are set back to waiting. A failure part-way can still leave other writes behind, such as an account made at confirm.Error with no code, and an unlisted code is left out. It leaves out the error's message, stack and other details. This covers the plugin's own log lines. What Payload, your mail adapter or your own functions log is up to them.retentionDays), with any account that was never confirmed. Waiting requests stay until someone decides them. With sign-in help, failure records are deleted after 7 days and help requests after 90 (signInHelp.retentionDays). Run pruneSignupRequests(payload) daily: it does all of this, and nothing is deleted without it.verifyHuman. Nothing is wired by default; on a public site, wire one.access.manage decides who sees and decides requests and changes the mode, and only an exact true counts: see Access. The plugin won't start without it, so a site can't leave the queue open to every signed-in member. signupStatus is shown only to the account itself and to managers. What checks set for the account (a minor flag, say) is kept out of the queue's view.On its own: it needs a users auth collection, Payload's email, and your access.manage. Checks, roles on approval and a human check are functions you pass in. It doesn't depend on any other plugin.
Needs: Payload ^3.80.0 as a peer dependency. No other EXTANT APE plugin is required.
Works with:
ageGateCheck goes in checks. A too-young person is refused, a minor is flagged in the queue, and minorUntil is written to the new account. The birth month and year stay in answers and are never stored. Its "stay blocked" cookie comes back through setCookies, from Age Gate's next release. Age Gate 0.1.x set it on req.responseHeaders, which Sign-up doesn't pass on (see Checks), so with 0.1.x the cookie is not set.scopeField and scopeFor, and add signup-requests to its collections, so each site sees its own queue. A link then works only on the site it was asked on.Color Theory: none yet. The screens are your own and take your site's CSS. The plain fallback pages the plugin serves use fixed colors and have no hook yet.
Family: It's part of the Identity family (a working draft): plugins designed to sit together for accounts and access. Age Gate is the member it's wired to today.
npm install @extantape/payload-plugin-signup
import { signupPlugin } from '@extantape/payload-plugin-signup'
export default buildConfig({
plugins: [
signupPlugin({
// None of these can be `unique`.
fields: [
{ name: 'firstName', type: 'text', required: true },
{ name: 'lastName', type: 'text', required: true },
],
toUser: (d) => ({ name: `${d.firstName} ${d.lastName}` }),
checks: [myAgeGate], // ({ data, answers, email, req, payload }) => { refuse?, flag?, userData?, setCookies? }
onApprove: async ({ user, req, payload }) => {
/* give roles */
},
access: { manage: ({ req }) => req.user?.role === 'admin' }, // required
emails: { verify: myBrandedVerifyEmail }, // any of verify, pending, approved, declined, alreadyHasAccount
urls: { signIn: 'https://example.com/login', resetPassword: 'https://example.com/forgot-password' },
}),
],
})
Build the collections' indexes before first use (signup-requests, signup-attempts, and the new signupStatus on your users; with signInHelp, also sign-in-failures and sign-in-help). If you build your own confirm page, show what was asked for with readSignupRequest, ask for the password there and post { token, password }; never confirm when the page loads. With a tenant plugin, pass scopeField and scopeFor, and add signup-requests to your tenant plugin's collections, so each site sees its own queue. The mode setting is one for the whole install.
submitSignup, and so POST /api/signup/request, answers a request that gets past the mode, the human check, the address and site limits, your checks and the check of its email and details no sooner than answerAfterMs after those steps. It's a whole number of milliseconds from 500 to 10000, and 2000 by default. A request that couldn't be saved fails after the same time. Refusals made earlier (a closed form, a check's refusal, an email or details that can't be accepted, or that check itself failing) are answered straight away.
The request is saved before it's answered. If saving takes longer than answerAfterMs, the answer waits for it, so set a time comfortably longer than your database needs. What your checks and other steps before this point take is added on top.
The email is sent in the background, so an answer can arrive before the email has gone, and a failure to send shows only in your logs.
next start, a container) needs nothing more.waitUntil, the host's way to keep working after the answer:import { waitUntil } from '@vercel/functions'
signupPlugin({ waitUntil, access })
// or, with Next.js
import { after } from 'next/server'
signupPlugin({ waitUntil: (work) => after(work), access })
It's called once for each request that reaches this step, whatever the outcome, with a promise that never rejects. Next's after only works while a request is being handled, so if your own scripts call submitSignup outside one, use a function that allows for that. If waitUntil throws, the request is still answered and the log says so. A host with no way to keep working after the answer can't promise the email is sent. Without waitUntil, the log warns whenever an email is still sending at the answer.
signupPlugin({
access,
// Asked once the person has confirmed, in approval mode. Only exactly `true` approves.
autoApprove: async ({ request, user, req, payload }) => looksFine(request.details),
// A list of addresses, or your own function.
notifyStaff: ['[email protected]'],
})
| Option | What it takes | Default |
|---|---|---|
autoApprove | ({ request, user, req, payload }) => boolean. request is the waiting request, without the link's hash or what checks set for the account. user is its account. | None: every request waits for staff |
notifyStaff | A list of email addresses, or (notice) => void with { about, reason, request or help, url, req, payload } | None: nobody is told |
emails.staffNotice | The email sent to a notifyStaff list | A short email with the reason and a link to the request in the admin. It leaves out the person's name, address and details |
checks or confirmChecks always sends the request to staff.signup-requests see it as they see a staff approval.POST /api/signup/verify and verifySignup answer active for a request approved this way, and the person gets "You're in" without the "request is in" email.onApprove throws, or staff decide the request in the same moment, the automatic approval changes nothing and the request is left as it was. onApprove runs before the account is activated, so a refusal leaves it unable to sign in.userData. What checks set for the account isn't on the request it gets, so a check that marks a minor only through userData doesn't stop an automatic approval. Have that check also return a flag (a flagged request never reaches your function), or look at the account inside your function: user already carries what checks set.reason: waiting (automatic approval wasn't tried), flagged, notApproved (your function didn't answer true) or failed. A notice that can't be sent is logged and changes nothing.limits.staffNotice). Past it, the notice is skipped and logged, and the request or help request is still in the admin.signupPlugin({ access, afterConfirm: ({ user, status }) => (status === 'active' ? '/welcome' : '/thanks') })
afterConfirm({ user, status, req, payload }) runs after the account is made, once the confirm has committed. status is 'active' or 'pending'. user is the account without its password, hash, salt or tokens.null or undefined for none. The path must start with one /, be at most 2048 characters, have no backslash, space or control character, and stay on the same site once parsed. Anything else is dropped, and the log says that the answer was dropped, without the value or the address.POST /api/signup/verify from the plugin's page answers 303 See Other to it, with Cache-Control: no-store, Referrer-Policy: no-referrer and any cookies your confirm checks set. As JSON the answer gains next: { status, next }. Without a valid path, nothing changes from 0.4.0.signupPlugin({ access, holdAddress: async (email, { scope, req, payload }) => await myBlockList.has(email) })
false lets an address through. true, any other value and a thrown error all hold it, and the log says so without the address.badLink), and the request is deleted when they confirm. Opening the confirm page or reading the details (GET /api/signup/details) gives the same badLink and shows nothing, and deletes nothing.holdAddress runs, and the request is deleted). The confirm answer has no set time like the sign-up form's answerAfterMs. Someone with a real link already knows the address, and the link goes only to its inbox, so this tells nobody anything new. A site that wants the two to look alike can wrap holdAddress to take a fixed time.import { resendSignup } from '@extantape/payload-plugin-signup'
const { ok, message } = await resendSignup(payload, requestID, req)
notUnverified (409). The earlier link stops working, and linkHours starts again.POST /api/signup/resend with { id } as JSON (Content-Type: application/json, else 415, so a form posted from another site is refused) is for managers only (access.manage answering exactly true, else 403 forbidden). It reads the request as that manager, so a request they can't read answers 404 notFound, the same as one that doesn't exist. It answers 202.ResendLinkButton from @extantape/payload-plugin-signup/client and needs react 19 or later and the admin's own @payloadcms/ui. After installing or upgrading, run payload generate:importmap, or the admin can't find it. It has been tested in jsdom, with Payload's hooks mocked, and not in a real admin or browser. Staff can also call the endpoint, or the function from your own code.linkHours (1 to 168, default 48) replaces verifyHours, which still works and gives the same value. Giving both with different values stops startup.signupPlugin({ access, signInHelp: true })
// In your own sign-in form's server code:
import { needsStepUp, needsSignInHelp, recordSignInFailure, requestSignInHelp } from '@extantape/payload-plugin-signup'
if ((await needsStepUp(payload, email)) !== 'no') await myBotCheck(req) // 'unknown' counts as 'yes'
// ...after a wrong email or password through the Local API:
const { help } = await recordSignInFailure(payload, email)
| Option | What it does | Default |
|---|---|---|
signInHelp | true, or the settings below. Adds two collections, one endpoint and a hook on your users' REST login | Off |
signInHelp.stepUpAfter | Failures for one typed address before needsStepUp answers yes | 3 |
signInHelp.stepUpWindowMinutes | How far back those failures count | 60 |
signInHelp.helpAfterRuns | Runs of failures in 7 days before help is offered. A run is stepUpAfter more failures | 2 |
signInHelp.retentionDays | Days a help request is kept if nobody ticks Handled | 90 |
signInHelp.sites | Required with scopeField. ({ req }) => 'all' or a list of site ids: the sites whose help requests this manager sees | None |
limits.help, limits.helpEmail, limits.helpSite | Help requests an hour per network address (only with clientAddress), per typed address, and for the whole site. Past the first two, a request gets 429 busy. The site-wide cap counts only requests that would be stored and never changes the answer: past it, a request is answered as usual and not stored | 5, 3 and 20 |
slugs.signInFailures, slugs.signInHelp | The two collections' slugs | sign-in-failures, sign-in-help |
| Function | Answer |
|---|---|
needsStepUp(payload, email) | 'yes', 'no' or 'unknown'. It only reads. 'unknown' means the record couldn't be read, so treat it as 'yes' |
needsSignInHelp(payload, email) | true or false. It only reads. false when the record can't be read |
recordSignInFailure(payload, email) | { help }, after recording one failure. It throws if the record can't be written |
requestSignInHelp(payload, { email, message? }, req) | { ok: true, message }, or a SignupError: email, busy or unavailable |
recentFailureCount(payload, email, sinceMs) | The number of failures recorded for the typed address since sinceMs (a time in milliseconds, at most 7 days back), or null if the record can't be read. A plain Error if sign-in help is off or sinceMs isn't a time that has passed. Server code only: no endpoint calls it, it takes no rate limit, and an address with an account and one without answer alike |
POST /api/users/login) by itself. Payload runs no hook when a Local API sign-in fails, so a form that calls payload.login records the failure with recordSignInFailure. GraphQL sign-ins aren't recorded.auth.maxLoginAttempts, 5 by default), and its sign-in answer for a locked account differs from the one for an address nobody has. That is Payload's answer, outside this plugin; sign-in help answers the same either way. Set it to 0 on your users collection if you want no locks.POST /api/signup/sign-in-help and requestSignInHelp take the typed address and an optional message of up to 1000 characters. The request is stored only when that address would be offered help. For any other address the answer is the same and nothing is stored. No account is looked up at any point.
answerAfterMs; if they take longer, the answer waits for them. The per-network and per-email limits count every request, whatever address was typed, and past them the answer is 429 busy. A failure record that can't be read gives 503 unavailable for every address alike.limits.helpSite) stores at most that many requests an hour, for the whole site. It is asked only about a request that would be stored. Past it, the request isn't stored, the log has a warning, and the caller gets the usual thanks, so a person who needed help won't hear back and isn't told to try again. Size it for your busiest hour and watch the log for that warning. In a burst right at the cap, the built-in limiter may store fewer than it could. A limiter that breaks or answers anything but true stores nothing, the same way. A request that would be stored but can't be saved is logged and answered as usual too.rateLimit is asked about helpSite only for a request it would store, with the usual three arguments, so counting every call is right. It still has to hold its limit when requests arrive together.waitUntil (see Answer time and serverless hosts).scopeField, a help request keeps the site from scopeFor in a text field named site, and a request with no site is refused. signInHelp.sites says which sites a manager sees. Only 'all' or a list of ids counts, and the plugin builds the query itself. The plugin won't start with scopeField and no signInHelp.sites. Leave sign-in-help out of your tenant plugin's collections.The plugin's stored data and collections don't change. If one of your sign-up fields is unique, step 9 changes your own. 0.3.0 doesn't arrive through a ^0.2.0 range, so change the version yourself.
waitUntil (above).submitSignup can set answerAfterMs: 500.submitSignup returns.rateLimit, check that it holds its limit when tries arrive at once.err now holds only name and, when there is one, code. Both come from a fixed list: your own error classes show as Error. To see why an email failed, use your mail provider's logs.details error code. POST /api/signup/request answers 400 with it when details can't be accepted. submitSignup throws a SignupError with it in place of Payload's ValidationError; when a field check failed, the list is still at error.data.errors. An email Payload won't accept gets the email code.email and your fields now run once more for each request, in the check before saving, so keep them free of side effects. No collection hooks run in that check. With transactions, it also makes a test write that is always rolled back. Inside your own transaction, that happens only on MongoDB.signup-requests unique, or the site won't start. Remove unique from your fields, and from any field or index that your config or another plugin adds to that collection. Then drop the index from the database, because removing the setting may leave it there. On MongoDB, list them in mongosh with db.getCollection('signup-requests').getIndexes(), and drop each one marked unique or prepareUnique, except _id_, with db.getCollection('signup-requests').dropIndex('<name>'). The site won't start until they're gone. On an SQL database, use a migration. The plugin doesn't check there. If a value has to be unique on accounts, handle that where you make or edit the account.verifyHours to linkHours, and keep it within 1 to 168. The old name still works for now.alreadyHasAccount email get account.status ('active' or 'pending') and should handle both.locale (the language the person asked in, or null) and scope (the site, or null). Later emails use the values stored on the request, not those of whoever confirms or decides. onApprove also gets scope.locale field. On MongoDB nothing needs doing. On SQL, run your migration.payload generate:importmap. The requests collection has a new admin button for resending a link, and the admin can't find it until the import map includes it.A check is a function in checks, run in order when a request comes in:
type Check = (args: { data; answers; email; req: PayloadRequest; payload }) =>
{ refuse?: string; flag?: string; userData?: Record<string, unknown>; setCookies?: string[] } | void
req is the request itself, headers and cookies included. A check written to take less (Partial<PayloadRequest>) still fits. Calling submitSignup from your own code with a partial request, or none, is fine: Payload's createLocalReq completes it, with empty headers.setCookies are whole Set-Cookie values. POST /api/signup/request sets them on its response, whether the request is taken or refused. submitSignup hands them back as setCookies on its result, or on the SignupError it throws, so your own form can set them. Each must be printable ASCII (space to ~), as cookie syntax allows; anything else counts as a broken check and refuses (503 checkFailed) before anything is stored or emailed.confirmChecks) work the same way: they get the request itself, and their setCookies go on the POST /api/signup/verify response, as JSON or the page, confirmed or refused. verifySignup hands them back on its result or its SignupError.req.responseHeaders of its own, and Sign-up throws that list away afterwards, so headers a check adds there never reach the response. The request's own list (an auth strategy's, say) is put back untouched. Sign-up and its checks don't import each other: the check returns plain values.| Method and path | Body | Answer |
|---|---|---|
GET /api/signup/mode | { mode, accepting, message } | |
POST /api/signup/request | { email, details, answers?, humanToken? } | 202 { ok, message }, or an error { error: { code, message } }, either with any cookies the checks set |
GET /api/signup/verify?token= | A small page: what was asked for (email and details), then choose a password and confirm | |
GET /api/signup/details?token= | { email, details: [{ name, label, value }] } for your own confirm page: only the email and the confirmShows fields, no ids, and it never uses up the link. A used, expired or made-up token all get the same 400 badLink. Counts against the verify rate limit | |
POST /api/signup/verify | { token, password } as JSON, or the page's form (token, password, confirm) | JSON { status: 'pending' or 'active', next? }, or a page (a 303 to next when afterConfirm gave one) |
POST /api/signup/resend | { id } as JSON, managers only | 202 { ok, message } saying what happened, or an error |
POST /api/signup/sign-in-help (with signInHelp) | { email, message? } | 202 { ok, message } whether or not the request was stored, or an error |
Error codes: notUnverified, forbidden, notFound, closed, inviteOnly, email, details (details that can't be accepted; the message names the fields when it can), password, passwordMismatch (the page only), refused, checkFailed, human, busy, badLink, hasAccount (an account was made for the address since they asked), unavailable (a help request that couldn't be taken). The same functions are exported for your own pages: submitSignup, verifySignup, currentMode, and readSignupRequest to show what was asked for on your confirm page (it only reads; the link still works). The confirm page shows only the email and the fields you list in confirmShows (default none), because a mistyped address sends the link to a stranger. Hidden fields and fields with their own read access never show.
access.manage decides who manages sign-up, and only an answer of exactly true, for a signed-in
user, counts. Anything else is a no: false, 1, 'yes', an object, a query (Where), or an error
thrown or rejected. An error doesn't escape as a 500: REST answers 403, as for anyone else who isn't a
manager. It's typed as Payload's Access so existing rules fit, but what it returns is never passed to
Payload, so an object that looks like a query can't widen the queue to every request.
| Where | A manager | Anyone else, or signed out |
|---|---|---|
| Sign-up requests (applicants' emails and details) | Reads, decides, deletes | Nothing |
| Sign-up settings (the mode and messages) | Reads and changes | Nothing |
An account's signupStatus | Reads | Only the account itself reads its own |
| Sign-in help requests (typed addresses and messages) | Reads, ticks Handled, deletes. With scopeField, only for the sites signInHelp.sites gives | Nothing |
| The record of failed sign-ins | Nothing | Nothing |
Nobody creates requests or help requests, or changes signupStatus, directly: the plugin does. Each site seeing only its
own queue comes from a tenant plugin with scopeField (above), not from a query in access.manage.
npm test # integration tests, in-memory MongoDB
npm run typecheck
npm run build
MIT. See LICENSE.
Topics
payload auth workos
WorkOS OAuth and enterprise SSO sign-in for Payload admin and app user collections
3751/wk5v3
payload better auth
Better Auth database adapter and plugins that run authentication through Payload collections
9011.9k/wk77v3 v4
payload authjs
Sign in to Payload CMS through Auth.js 5 providers and use the Auth.js session as the Payload user
903.1k/wk206v3
payload totp
Add TOTP-based two-factor authentication to a Payload auth collection using authenticator apps
8425.1k/wk168v3
payload plugin masquerade
Let admins switch to another user and browse as them without a password, then switch back
8083/wk30v3
payload auth cookie
Authenticate Payload admin and app users from cookies set by an external SSO system
7683/wk4v3