• Stars
    star
    310
  • Rank 134,926 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 6 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Provide basic auth your Nuxt.js application

Nuxt.js basic auth module

code style: prettier donate: Patreon License: MIT NPM version All Contributors NPM downloads codecov

f2653ad0d131606c49edb3f605cbf547

Provide basic authentication to your Nuxt.js application

https://www.npmjs.com/package/nuxt-basic-auth-module

Installation

$ yarn add nuxt-basic-auth-module # or npm install

Usage

Edit your nuxt.config.js

export default {
  // ...
  modules: [
    'nuxt-basic-auth-module'
  ],
  basic: {
    name: 'AUTH USER NAME HERE',
    pass: 'AUTH PASSWORD HERE',
    enabled: process.env.BASIC_ENABLED === 'true' // require boolean value(nullable)
  },

  // ...
}

Arguments

enabled

  • type: Boolean
  • default: false
  • required: false

Whether to activate this module. If false, module registration is skipped.

name

  • type: String | Function
  • required: true

Basic Auth user name.

The function passes req as an argument and must return the username as string.

pass

  • type: String | Function
  • required: true

Basic Auth user password.

The function passes req as an argument and must return the password as string.

message

  • type: String,
  • default: 'Please enter username and password'
  • required: false

Message to be displayed during basic authentication.

match

  • type: String(regex literal) | Function
  • required: false

The target path. This allows you to set up basic authentication that is limited to routes that match regular expression literals or where the function returns true.

The function passes req as an argument.

License

MIT

https://github.com/potato4d/nuxt-basic-auth-module/blob/master/LICENSE

Contributors

Thanks goes to these wonderful people (emoji key):


Takuma HANATANI

๐Ÿ’ป ๐Ÿšง ๐Ÿ“– ๐Ÿ›

Anthony Fu

๐Ÿ’ป

Jleroy

๐Ÿ’ป

This project follows the all-contributors specification. Contributions of any kind welcome!

More Repositories

1

nuxt-firebase-sns-example

Nuxt v2 & Firebase(Hosting / Functions SSR / Firestore), Google Auth SNS Example.
Vue
483
star
2

nuxt-client-init-module

Provide client version of nuxtServerInit
JavaScript
236
star
3

vue-fixed-header

Simple and cross-browser friendly fixed header component for Vue.js written by TypeScript.
Vue
167
star
4

nuxt-beginners-guide

Japan's first book that corresponds to Nuxt.js v2 and focuses on deep content.
Vue
135
star
5

pokemon63

ใ€Œใฟใ‚“ใชใฎ63 - ใ‚นใ‚ฏใƒชใƒผใƒณใ‚ทใƒงใƒƒใƒˆใ‹ใ‚‰่‡ชๅ‹•่งฃๆžใงใใ‚‹ใƒใ‚ฑใƒขใƒณใฎ้ธๅ‡บๆŠ•็จฟใ‚ตใ‚คใƒˆใ€ใฎใ‚ฝใƒผใ‚นใ‚ณใƒผใƒ‰
TypeScript
108
star
6

nuxt-maintenance-mode

Maintenance mode module for Nuxt.js.
TypeScript
107
star
7

dodai

Static Site Generator
TypeScript
59
star
8

contributter

Evergreen for you.
TypeScript
56
star
9

how-to-safety-env-use-in-nuxt

Safe env vars handling sample by Nuxt.js project
Vue
36
star
10

parcel-examples

Parcel project examples for React, Vue, preact, VanillaJS and jQuery.
JavaScript
27
star
11

potato4d

22
star
12

vue-dev-template

[deprecated] Vue.js development template.
Vue
22
star
13

nuxt-and-wp-api-on-docker

Vue
20
star
14

docker-multi-stage-build-on-nuxt

Vue
20
star
15

kamishibai-viewer

Qiita slide mode embed library
Vue
19
star
16

yomu

The README explorer for node_modules.
TypeScript
15
star
17

rehype-plugin-image-native-lazy-loading

Native lazy loading plugin for Rehype
TypeScript
15
star
18

vite-template-vue3-library

TypeScript
14
star
19

nuxt-tech-book

Nuxt tech book support document
12
star
20

vuex-map-purge

Convert Vuex map utils to computed / methods.
TypeScript
11
star
21

potato4d.me

potato4d's website
HTML
10
star
22

minimalytm-website

minimalytm official Website
Vue
9
star
23

sentei

CLI Git branch cleaner built with Node.js
TypeScript
9
star
24

huniki_generator

ใ€Œใœใ‚“ใœใ‚“ใ‚ใ‹ใ‚‰ใชใ„ใ€ไฟบ้”ใฏ้›ฐๅ›ฒๆฐ—ใงใ‚ฎใƒ•ใƒใƒ–ใ‚’ใ‚„ใฃใฆใ„ใ‚‹ใ€
HTML
7
star
25

techfeed-share-button

The social share button for TechFeed
TypeScript
7
star
26

vue-next-tsx-only-tsc

HTML
6
star
27

nuxt_html5expertsjp

Vue
6
star
28

qiita-feed-generator

Private feed generator for Qiita.
TypeScript
6
star
29

minimalytm

Minimal YouTube Music Player built with Electron
TypeScript
6
star
30

rehype-plugin-auto-resolve-layout-shift

Flexible improve CLS plugin for rehype.
TypeScript
6
star
31

react-muted-video-player

TypeScript
6
star
32

nuxt-typescript-with-grpc-web

[WIP] Nuxt.js application development environment using gRPC Web and TypeScript
JavaScript
6
star
33

sublime-HSP

This is the Sublime Text HSP syntax package.
5
star
34

bk-slack-to-gh-issue

Slack Message send to Github Issue Using Botkit.
JavaScript
4
star
35

liff-screenshot-plugin

ScreenShot plugin for LIFF
TypeScript
4
star
36

unlinkable

The easiest way to unlink an @mention.
Vue
4
star
37

to-webp

TypeScript
3
star
38

ytm-share-proxy

OGP Proxy for YouTube Music
HTML
3
star
39

renovate-config

3
star
40

riot-wp-api

Riot.js with WP REST API Sample for WordCamp Kansai 2016. Please fork me and use hands-on!
JavaScript
3
star
41

node-connpass

The connpass API wrapper library for Node.js.
TypeScript
3
star
42

iso8601

HTML
2
star
43

dotfiles

My dotfiles.
Shell
1
star