
Research
/Security News
Fake imToken Chrome Extension Steals Seed Phrases via Phishing Redirects
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.
payload-invitations
Advanced tools
Payload CMS plugin that replaces the default user creation flow with a streamlined invitation system.
Invite-only user onboarding for Payload CMS with email invitations, token-based acceptance, and automatic password setup.
Payload lets anyone with admin access create users, but there is no built-in way to invite someone by email and let them set their own password. This plugin turns user creation into an invitation flow: admins enter only an email, the plugin sends an invitation link, and the invitee chooses a password on a branded acceptance page. It hooks into Payload's existing email-verification mechanism so there is no extra collection to manage.
Features
pnpm add payload-invitations
// payload.config.ts
import { buildConfig } from "payload";
import { invitationsPlugin } from "payload-invitations";
export default buildConfig({
// ...
plugins: [invitationsPlugin()],
});
To customize the invitation email:
invitationsPlugin({
generateInvitationEmailHTML: ({ invitationURL, user }) =>
`<p>Hi ${user.name}, <a href="${invitationURL}">accept your invitation</a>.</p>`,
generateInvitationEmailSubject: () => "You're invited!",
})
Prerequisites: Your Payload config must have
admin.userset to a valid auth collection and an email adapter configured. The plugin warns and no-ops if either is missing.
| Option | Type | Default | Description |
|---|---|---|---|
acceptInvitationURL | string | AcceptInvitationURLFn | Built-in admin page | Custom URL for the accept-invitation page. See Headless Usage. |
emailSender | EmailSender | EmailSenderOption | Payload email adapter defaults | Custom sender address and name for invitation emails. See Custom Email Sender. |
generateInvitationEmailHTML | (args: { req, invitationURL, user }) => string | Promise | Simple HTML with an acceptance link | Customize the invitation email body. |
generateInvitationEmailSubject | (args: { req, invitationURL, user }) => string | Promise | "You have been invited" | Customize the invitation email subject line. |
By default, invitation emails are sent from the address configured in your Payload email adapter. To use a different sender (e.g., per-tenant branding in a multi-tenant setup), use the emailSender option:
// Static sender
invitationsPlugin({
emailSender: { email: "noreply@acme.com", name: "Acme Corp" },
})
For dynamic resolution (e.g., from a tenant document):
invitationsPlugin({
emailSender: async ({ req, user }) => {
const tenant = await req.payload.findByID({
collection: "tenants",
id: user.tenant,
});
return { email: tenant.senderEmail, name: tenant.senderName };
},
})
If you have a custom frontend for accepting invitations, set acceptInvitationURL to point invitation emails to your page instead of the built-in admin view:
invitationsPlugin({
acceptInvitationURL: "https://myapp.com/accept-invite",
})
For dynamic URLs, pass a function:
invitationsPlugin({
acceptInvitationURL: ({ token, user, req, defaultURL }) => {
return `https://myapp.com/accept-invite?token=${token}`;
},
})
On your custom page, use the server-side utilities to validate tokens and accept invitations:
import { getInviteData, acceptInvite } from "payload-invitations";
// Validate a token and get the invited user's data
const result = await getInviteData({ token, payload });
if (result.success) {
console.log(result.user.email);
} else {
console.log(result.error); // 'INVALID_TOKEN' | 'ALREADY_ACCEPTED'
}
// Accept the invitation (sets password, verifies user, logs in)
const acceptance = await acceptInvite({ token, password, payload });
if (acceptance.success) {
// Set the auth cookie in your response
cookies().set(
acceptance.cookie.name,
acceptance.cookie.value,
acceptance.cookie.options,
);
}
This plugin lives in the payload-plugins monorepo.
pnpm install
# watch this plugin for changes
pnpm --filter payload-invitations dev
# run the Payload dev app (in a second terminal)
pnpm --filter sandbox dev
The sandbox/ directory is a Next.js + Payload app that imports plugins via workspace:* -- use it to test changes locally.
fix(payload-invitations): ...).pnpm release.Bug reports and feature requests are welcome -- open an issue.
MIT
FAQs
Payload CMS plugin that replaces the default user creation flow with a streamlined invitation system.
We found that payload-invitations demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Mixed-script homoglyphs and a lookalike domain mimic imToken’s import flow to capture mnemonics and private keys.

Security News
Latio’s 2026 report recognizes Socket as a Supply Chain Innovator and highlights our work in 0-day malware detection, SCA, and auto-patching.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.