Skip to content

wensaint/auth-module

 
 

Repository files navigation

🔑 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

About

支持runtime config的auth-module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.6%
  • JavaScript 2.7%
  • Other 0.7%