๐Ÿ“ฆ payloadcms / plugin-password-protection

The official password protection plugin for Payload

โ˜… 29 stars โ‘‚ 1 forks ๐Ÿ‘ 29 watching
payloadpayload-pluginpayloadcms
๐Ÿ“ฅ Clone https://github.com/payloadcms/plugin-password-protection.git
HTTPS git clone https://github.com/payloadcms/plugin-password-protection.git
SSH git clone git@github.com:payloadcms/plugin-password-protection.git
CLI gh repo clone payloadcms/plugin-password-protection
Jacob Fletcher Jacob Fletcher Merge pull request #1 from payloadcms/chore/eslint 478982a 2 years ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ demo
๐Ÿ“ src
๐Ÿ“„ .editorconfig
๐Ÿ“„ .eslintrc.js
๐Ÿ“„ .gitignore
๐Ÿ“„ .prettierrc.js
๐Ÿ“„ package.json
๐Ÿ“„ README.md
๐Ÿ“„ tsconfig.json
๐Ÿ“„ yarn-error.log
๐Ÿ“„ yarn.lock
๐Ÿ“„ README.md

Payload Password Protection Plugin

NPM

A plugin for Payload to easily allow for documents to be secured behind a layer of password protection.

Installation

yarn add payload-plugin-password-protection
  # OR
  npm i payload-plugin-password-protection

Basic Usage

In the plugins array of your Payload config, call the plugin with options:

import { buildConfig } from 'payload/config';
import passwordProtection from 'payload-plugin-password-protection';

const config = buildConfig({
  collections: [
  plugins: [
    passwordProtection({
      collections: ['pages'],
    })
  ]
});

export default config;

Options

collections

An array of collections slugs to enable password protection.

TypeScript

All types can be directly imported:

import { PasswordProtectionConfig } from "payload-plugin-password-protection/dist/types";

Screenshots