npm.io
1.0.1 • Published 4 years ago

nuxt-auth-wensaint

Licence
MIT
Version
1.0.1
Deps
9
Size
257 kB
Vulns
25
Weekly
0
Stars
2

Auth Module

Zero-boilerplate authentication support for Nuxt.js!

Refer to the document before usage(具体使用请参照官方文档)

Modify Remark

The origin proect cant't support auth runtimeConfig. So i have to build again and again when I deploy the site within different subdomains(eg https://xxx.com/a and https://xxx.com/b), what a waste of time!!!

本项目在原项目基础上实现了cookie与localStorage节点的runtime配置,从而实现“一套代码、多处部署”,即使在同一个域名下也不会互相干扰。 使用示例如下

publicRuntimeConfig: {
	auth: {
	  cookie: {
		prefix: 'test.',
		options: {
		  path: '/',
		  maxAge: 2 * 3600
		}
	  },
	  localStorage: {
		prefix: 'test.'
	  }
	}
}

Development

Running demo for development:

$ yarn install
$ yarn dev

Running tests for development:

$ yarn build
$ yarn nuxt build test/fixture
$ yarn jest

License

MIT License - Copyright (c) Nuxt Community