0.0.2 • Published 2 years ago

payload-plugin-password-protection v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Payload Password Protection Plugin

NPM

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

Core features:

  • one
  • two

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