Hats

Linked accounts and role hats, with a second factor before switching to a sensitive role

Community 0 469/wk MIT v0.2.0

Installation

pnpm add @extantape/payload-plugin-hats

About

Hats lets one person link several accounts and switch between them from the admin header. An account with several roles acts in one role at a time, and each role narrows what the session can reach, so access rules follow the role being worn.

Switching into a sensitive role asks for that account's second factor, and the check is remembered for three hours per account. Linking another account needs both email addresses confirmed and an approver who is not part of the set. Unlinking takes effect at once, and ending a link signs out any session that was using it.

Package info

Package name
@extantape/payload-plugin-hats
Latest version
0.2.0
Unpacked size
88 kB
License
MIT
Weekly downloads
469
Last publish
Nov 17, 2026

More from ExtantApe

View profile

Birth month and year check at sign-up that flags minors by country and region

Builds site and admin themes from color harmonies, with contrast checks in light and dark

Browses large nested document trees one level at a time with live counts

Stores DNA reference panels and reviewed sample results in Payload collections

Studbook numbers, kinship and inbreeding analysis for managed animal populations

Pedigree fields, relatives and family-tree views for Payload collections

Similar plugins

More in Auth

Lets one Payload admin panel manage content for many separate tenants

Sells digital products with signed download links that expire and stop on refund

Adds passkey sign-in and passkey management to the Payload login and account screens

Lets AI assistants read and edit Payload content over MCP with scoped API keys

Lets guardians suggest or approve changes to a minor's records and requests