Skip to content

payloadcms/plugin-password-protection

Repository files navigation

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

About

The official password protection plugin for Payload

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors 4

  •  
  •  
  •  
  •