# pallies

> Robust user management for Hapi

Latest version **0.10.0** (published 2026-06-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install pallies
pnpm add pallies
yarn add pallies
bun add pallies
```

## Health

**Score 45/100 (D)** — status: active.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.10.0 |
| Published | 2026-06-01 |
| First published | 2019-12-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 19 |
| Unpacked size | 36.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Derek Wheelden |
| Maintainers | frxnz |
| Keywords | hapi, hpal, user, management, plugin, token |

## Links

- npm: https://www.npmjs.com/package/pallies
- Repository: https://github.com/derekwheee/pallies
- Homepage: https://github.com/derekwheee/pallies#readme
- Issues: https://github.com/derekwheee/pallies/issues
- npm.io page: https://npm.io/package/pallies

## Dependencies (19)

- [pg](https://npm.io/package/pg.md) ^8.5.1
- [joi](https://npm.io/package/joi.md) ^17.3.0
- [toys](https://npm.io/package/toys.md) ^2.3.1
- [haute](https://npm.io/package/haute.md) ^4.0.0
- [argon2](https://npm.io/package/argon2.md) ^0.44.0
- [csprng](https://npm.io/package/csprng.md) ^0.1.2
- [moment](https://npm.io/package/moment.md) ^2.29.1
- [hashids](https://npm.io/package/hashids.md) ^2.2.8
- [@hapi/jwt](https://npm.io/package/@hapi/jwt.md) ^3.2.3
- [objection](https://npm.io/package/objection.md) ^3.0.1
- [@hapi/boom](https://npm.io/package/@hapi/boom.md) ^9.1.1
- [@hapi/glue](https://npm.io/package/@hapi/glue.md) ^9.0.1
- [@hapi/hapi](https://npm.io/package/@hapi/hapi.md) ^21.4.9
- [rand-token](https://npm.io/package/rand-token.md) ^1.0.1
- [@hapipal/schwifty](https://npm.io/package/@hapipal/schwifty.md) ^6.1.0
- [generate-password](https://npm.io/package/generate-password.md) ^1.6.0
- [@hapipal/schmervice](https://npm.io/package/@hapipal/schmervice.md) ^2.0.0
- [objection-db-errors](https://npm.io/package/objection-db-errors.md) ^1.1.2
- [@hapipal/haute-couture](https://npm.io/package/@hapipal/haute-couture.md) ^4.2.0

## Recent versions

- 0.10.0 (latest) — 2026-06-01
- 0.9.1 — 2025-07-14
- 0.9.0 — 2024-05-15
- 0.8.3 — 2023-07-18
- 0.8.2 — 2023-07-18
- 0.8.1 — 2023-06-06
- 0.7.3-rc.0 — 2022-11-28
- 0.7.2 — 2022-11-28
- 0.7.2-2 — 2022-11-17
- 0.7.2-1 — 2022-11-17
- 0.7.2-0 — 2022-11-15
- 0.7.1-0 — 2022-11-15
- 0.7.0 — 2022-11-04
- 0.6.0 — 2022-05-16
- 0.5.1 — 2021-10-25
- … 26 more at https://npm.io/package/pallies/versions

## README

# Pallies 

[![Build Status](https://travis-ci.org/frxnz/pallies.svg?branch=master)](https://travis-ci.org/frxnz/pallies)
[![Coverage Status](https://coveralls.io/repos/github/frxnz/pallies/badge.svg?branch=master)](https://coveralls.io/github/frxnz/pallies?branch=master)

Pallies is a user management plugin for [hapi](https://hapi.dev/), designed to work best with
[hapipal](https://github.com/hapipal).



### Resources
* [API documentation](https://frxnz.github.io/pallies/)

### Features
* Supports hapi v18+
* Built-in support for user invite and forgot password tokens
* Powerful configuration using [Confidence](https://github.com/hapijs/confidence)
* Strong password encryption using [Argon2](https://www.npmjs.com/package/argon2)
* Use any database supported by [Knex](http://knexjs.org/) and [Objection](https://vincit.github.io/objection.js/)

### Getting Started

This guide assumes you've already created a hapi project using hpal

Looking for a starting point? Check the [Pallies Demo Repo](https://github.com/frxnz/pallies-demo-api).

#### Install the Pallies module from npm
```bash
npm install --save pallies
```

#### Configure Pallies
Create a configuration file at `server/.palliesrc.js`

[Example Pallies configuration](https://github.com/frxnz/pallies/blob/master/server/.palliesrc.js)

#### Update Your Manifest

```js
// Register Pallies as a plugin in `lib/plugins/pallies.js
'use strict';

const PalliesConfig = require('../../server/.palliesrc');
const User = require('../models/user');

module.exports = (server, options) => ({
    plugins: {
        options: {
            isDev : options.isDev,
            ...PalliesConfig
        }
    }
});
```

```js
// Register Schwifty in server/manifest.js
{
    plugin: 'schwifty',
    options: {
        $filter: { $env: 'NODE_ENV' },
        $default: {},
        $base: {
            migrateOnStart: true,
            knex: {
                client: 'pg',
                connection: {
                    host: { $env: 'DB_HOST' },
                    user: { $env: 'DB_USER' },
                    password: { $env: 'DB_PASSWORD' },
                    database: { $env: 'DB_DATABASE' }
                },
                migrations: {
                    stub: 'Schwifty.migrationsStubPath'
                }
            }
        },
        production: {
            migrateOnStart: false
        }
    }
}
```

#### Update `knexfile.js`

Add the Pallies migration directory to your migrations configuration

```js
// ...
migrations: {
    directory: [
        'node_modules/pallies/lib/migrations',
        Path.relative(process.cwd(), PluginConfig.migrationsDir)
    ]
}
//...
```

#### Apply database migrations
```bash
npx knex migrate:latest
```

---
_Source: https://npm.io/package/pallies · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
