1.0.0 • Published 1 year ago

@area37/vendure-plugin-customer-approve v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Vendure Customer Approve Plugin

This plugin allows you to manually approve customers before they can log in and place orders. It is particularly useful in B2B scenarios where you want to vet customers before granting them access to your store.

@area37/vendure-plugin-customer-approve horizontal

Installation

  1. To install the plugin, run the following command:

pnpm i @area37/vendure-plugin-customer-approve

  1. Add the plugin to your vendure-config.ts file:
import { CustomerApprovePlugin } from '@area37/vendure-plugin-customer-approve';

plugins: [
    CustomerApprovePlugin.init({}),
    AdminUiPlugin.init({
        port: 3002,
        route: 'admin',
        app: compileUiExtensions({
            extensions: [CustomerApprovePlugin.ui],
            outputPath: path.join(__dirname, "./admin-ui"),
        }),
    }),
],
  1. Add authOptions to your vendure-config.ts file:
authOptions: {
    ...,
    requireVerification: true,
},

This setting will require customers to verify their email addresses before they can log in.

  1. You should also disable the default email verification handler:
import { orderConfirmationHandler, passwordResetHandler, emailAddressChangeHandler } from '@vendure/email-plugin';

export const config: VendureConfig = {
    plugins: [
        ...
        EmailVerificationPlugin.init({
            ...
            handlers: [
                orderConfirmationHandler,
                passwordResetHandler,
                emailAddressChangeHandler,
            ]
        }),
    ],
};
1.0.0

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago