Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adonisjs/auth

Package Overview
Dependencies
Maintainers
2
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adonisjs/auth - npm Package Compare versions

Comparing version 3.0.5 to 3.0.6

LICENSE.md

12

CHANGELOG.md

@@ -0,1 +1,13 @@

<a name="3.0.6"></a>
## [3.0.6](https://github.com/adonisjs/adonis-auth/compare/v3.0.5...v3.0.6) (2018-07-15)
### Bug Fixes
* **jwt:** use option jwtOptions in generateForRefreshToken ([#107](https://github.com/adonisjs/adonis-auth/issues/107)) ([019dfbf](https://github.com/adonisjs/adonis-auth/commit/019dfbf))
* **session:** use cookie options for rememberme token ([4cdaf87](https://github.com/adonisjs/adonis-auth/commit/4cdaf87)), closes [#117](https://github.com/adonisjs/adonis-auth/issues/117)
* ensure uid in always a string in validate calls ([fb07728](https://github.com/adonisjs/adonis-auth/commit/fb07728)), closes [#118](https://github.com/adonisjs/adonis-auth/issues/118)
<a name="3.0.5"></a>

@@ -2,0 +14,0 @@ ## [3.0.5](https://github.com/adonisjs/adonis-auth/compare/v3.0.4...v3.0.5) (2018-03-30)

51

package.json
{
"name": "@adonisjs/auth",
"version": "3.0.5",
"version": "3.0.6",
"description": "Offical authentication provider for Adonis framework",
"main": "index.js",
"files": [
"src",
"providers",
"templates",
"instructions.js",
"instructions.md"
],
"directories": {

@@ -10,9 +17,11 @@ "test": "test"

"scripts": {
"lint": "standard",
"mrm": "mrm --preset=@adonisjs/mrm-preset",
"pretest": "npm run lint",
"posttest": "npm run coverage",
"test:local": "FORCE_COLOR=true node bin/index.js --local",
"test": "nyc npm run test:local",
"test:win": "set FORCE_COLOR=true && node bin/index.js --win",
"coverage": "nyc report --reporter=text-lcov | coveralls"
"test": "nyc japa",
"test:win": "node ./node_modules/japa-cli/index.js",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"commit": "git-cz",
"lint": "standard"
},

@@ -35,23 +44,27 @@ "keywords": [

"devDependencies": {
"@adonisjs/fold": "^4.0.7",
"@adonisjs/lucid": "^5.0.3",
"@adonisjs/fold": "^4.0.9",
"@adonisjs/lucid": "^5.0.4",
"@adonisjs/mrm-preset": "^1.0.9",
"@adonisjs/sink": "^1.0.16",
"commitizen": "^2.10.1",
"cookie": "^0.3.1",
"coveralls": "^3.0.0",
"coveralls": "^3.0.2",
"cz-conventional-changelog": "^2.1.0",
"edge.js": "^1.1.4",
"fs-extra": "^5.0.0",
"fs-extra": "^6.0.1",
"japa": "^1.0.6",
"japa-cli": "^1.0.1",
"macroable": "^1.0.0",
"mrm": "^1.2.1",
"node-req": "^2.1.0",
"nyc": "^11.6.0",
"nyc": "^12.0.2",
"pkg-ok": "^2.2.0",
"semver": "^5.5.0",
"sqlite3": "^4.0.0",
"sqlite3": "^4.0.1",
"standard": "^11.0.1",
"supertest": "^3.0.0"
"supertest": "^3.1.0"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
"path": "cz-conventional-changelog"
}

@@ -61,6 +74,4 @@ },

"exclude": [
"src/Exceptions",
"providers",
"test",
"bin"
"japaFile.js"
]

@@ -74,11 +85,11 @@ },

"dependencies": {
"@adonisjs/generic-exceptions": "^2.0.0",
"@adonisjs/generic-exceptions": "^2.0.1",
"basic-auth": "^2.0.0",
"debug": "^3.1.0",
"jsonwebtoken": "^8.2.0",
"lodash": "^4.17.5",
"jsonwebtoken": "^8.3.0",
"lodash": "^4.17.10",
"ms": "^2.1.1",
"resetable": "^1.0.3",
"uuid": "^3.2.1"
"uuid": "^3.3.2"
}
}

@@ -187,3 +187,3 @@ 'use strict'

async validate (uid, password, returnUser = false) {
const user = await this._serializerInstance.findByUid(uid)
const user = await this._serializerInstance.findByUid(typeof (uid) === 'string' ? uid : null)
if (!user) {

@@ -190,0 +190,0 @@ throw this.missingUserFor(uid)

@@ -334,3 +334,3 @@ 'use strict'

const token = await this.generate(user, jwtPayload)
const token = await this.generate(user, jwtPayload, jwtOptions)

@@ -337,0 +337,0 @@ /**

@@ -31,4 +31,6 @@ 'use strict'

class SessionScheme extends BaseScheme {
constructor () {
constructor (Config) {
super()
this._cookieOptions = Config.get('session.cookie', {})
this._rememberTokenDuration = new Resetable(0)

@@ -38,2 +40,13 @@ }

/**
* Injections via IoC container
*
* @method inject
*
* @return {Array}
*/
static get inject () {
return ['Adonis/Src/Config']
}
/**
* Reference to the value of `sessionKey` inside the config block.

@@ -84,5 +97,5 @@ * Defaults to `adonis-auth`

if (rememberToken && duration) {
this._ctx.response.cookie(this.rememberTokenKey, rememberToken, {
this._ctx.response.cookie(this.rememberTokenKey, rememberToken, Object.assign(this._cookieOptions, {
expires: new Date(Date.now() + duration)
})
}))
}

@@ -89,0 +102,0 @@ }

@@ -17,5 +17,5 @@ 'use strict'

UserHook.hashPassword = async (userInstance) => {
if (userInstance.password) {
if (userInstance.dirty.password) {
userInstance.password = await Hash.make(userInstance.password)
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc