nuxt-weblock
v1.0.19
Published
Nuxt 3 module to lock your whole website with password.
Downloads
97
Readme
Nuxt WebLock Module
Nuxt 3 module to lock your whole website with password. All routes will be inaccessible until the correct password is entered.
Features
- 🔒 Lock your whole website with password. Ideal for staging environments, client previews, etc.
- 🍪 Successfully entered password will be stored in a cookie, so you don't have to enter it again.
Quick Setup
- Add
nuxt-weblock
dependency to your project
# Using pnpm
pnpm add nuxt-weblock
# Using yarn
yarn add nuxt-weblock
# Using npm
npm install nuxt-weblock
- Add
nuxt-weblock
to themodules
section ofnuxt.config.ts/js
and configurenuxt-weblock
by definingwebLock
section
export default defineNuxtConfig({
modules: [
'nuxt-weblock'
],
webLock: {
password: '123456', // safer password might be a better idea 😁
isEnabled: true // ideal to be set to false in production
}
})
That's it! You can now use WebLock Module in your Nuxt app ✨
Development
# Install dependencies
yarn install
# Generate type stubs
yarn run dev:prepare
# Develop with the playground
yarn run dev
# Build the playground
yarn run dev:build
# Run ESLint
yarn run lint
# Release new version
yarn run release