@frigear-nu/users
The user entity of the main frigear app: the users table, staff administration of users, and what a signed-in user can
change about themselves. How people sign in lives in @frigear-nu/auth, which this module installs.
Features
- ⛰ The
userstable and its schema, extended by other modules (credentials byauth, ...). - 🛠 Staff administration (
settings.admin): list, create, edit, delete and re-invite users, a "new users" widget and an admin page (with@frigear-nu/admin). Access is by permission (users:read,users:list,users:create,users:update,users:delete,users:manage), granted through roles; staff can never change a user who holds a permission they lack. Roles themselves are assigned through@frigear-nu/authorization. - 🧑 Self-service: change profile, email (optionally confirmed from the inbox) and password.
- 🧩
requireUser/getUser(authentication only) for server routes, andextendUsersAdminplusloadUsersAdminTargetfor modules that add to the admin user page. - 🔌 Registers the user store
@frigear-nu/authreads and writes users through.
Quick Setup
npx nuxt module add @frigear-nu/users
This module requires @nuxthub/core in the host app. Generate and commit a migration for the
tables it contributes (see the module-kit migrations guide).
export default defineNuxtConfig({
modules: ['@nuxthub/core', '@frigear-nu/users'],
users: {
settings: {
admin: true, // staff administration; `{ page: false }` = API only
verifyEmailChange: true, // a new address must be confirmed from its inbox
profilePath: '/account/profile', // where that confirmation lands
mcp: false, // the `get-my-profile` MCP tool
},
},
})
See the documentation for the routes, hooks and the user page extension
points, and @frigear-nu/auth for sign-in (authentication.settings).
Development
pnpm --filter '@frigear-nu/users' test