0.2.1 • Published 2 years ago

nuxt-website-lock v0.2.1

Weekly downloads
49
License
MIT
Repository
github
Last release
2 years ago

nuxt-website-lock

npm version npm downloads Github Actions CI License

📖 Release Notes

Setup

  1. Add nuxt-website-lock dependency to your project
yarn add nuxt-website-lock # or npm install nuxt-website-lock
  1. Add nuxt-website-lock to the modules section of nuxt.config.js
{
  modules: [
    // Simple usage
    'nuxt-website-lock',

    // website-lock has to be before axios so axios instance is available at websitelock module
    // to enable validation of token on BE change "enableServerValidation" to true
    ['nuxt-website-lock', {enableServerValidation: false, enabled: true, password: 'superSecretPassword'}],
    '@nuxtjs/axios',
  ]
}

Module options

Option nameDescriptionDefault valuePossible values
enabledwhether website lock should be enableddefault: nulloptions: true/false
passwordpassword which unlocks websitedefault: nullany string (will be simply hashed to md5)
formPathurl at which the form for website lock will bedefault: /website-lockany string starting with slash
enableServerValidationwhether password should be validated against BE (tailor fitted for personal use, will be expanded upon in later versions)default: falseoptions: true/false
cookieNamename of the cookie under which the hashed token will be storeddefault: websiteLock._tokenany string, cannot be null
cookieobject storing some cookie
cookie.prefixprefix of cookieName being storeddefault: ''any string, cannot be null
cookie.expiresnumber of days in which the cookie will expiredefault: 2any unsigned integer

Todo

  • better customizability

Development

  1. Clone this repository
  2. Install dependencies using yarn install or npm install
  3. Start development server using npm run dev

License

MIT License

Copyright (c) Patrik Jánosdeák

0.2.1

2 years ago

0.2.0

2 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.4

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago