@nuxtjs/auth
Advanced tools
Comparing version 4.8.4 to 4.8.5
@@ -5,2 +5,11 @@ # Changelog | ||
### [4.8.5](https://github.com/nuxt-community/auth-module/compare/v4.8.4...v4.8.5) (2019-12-27) | ||
### Bug Fixes | ||
* **core:** always return boolean form hasScope ([a2da3a4](https://github.com/nuxt-community/auth-module/commit/a2da3a4775266aee859c48763b3c3788efe08f02)) | ||
* **core:** support querystring only url for `isRelativeURL` ([#492](https://github.com/nuxt-community/auth-module/issues/492)) ([09d81ea](https://github.com/nuxt-community/auth-module/commit/09d81ead05c11bcd453ad59c3796987872787a12)) | ||
* **module:** always transpile nanoiid ([8ef5a9b](https://github.com/nuxt-community/auth-module/commit/8ef5a9bf6cff886be2dfc49855cf5c7c4cb1c670)), closes [#472](https://github.com/nuxt-community/auth-module/issues/472) | ||
### [4.8.4](https://github.com/nuxt-community/auth-module/compare/v4.8.3...v4.8.4) (2019-09-12) | ||
@@ -7,0 +16,0 @@ |
@@ -1,5 +0,3 @@ | ||
import getProp from 'dotprop' | ||
import Storage from './storage' | ||
import { routeOption, isRelativeURL, isSet, isSameURL } from './utilities' | ||
import { routeOption, isRelativeURL, isSet, isSameURL, getProp } from './utilities' | ||
@@ -270,2 +268,8 @@ export default class Auth { | ||
if (!this.ctx.app.$axios) { | ||
// eslint-disable-next-line no-console | ||
console.error('[AUTH] add the @nuxtjs/axios module to nuxt.config file') | ||
return | ||
} | ||
return this.ctx.app.$axios | ||
@@ -393,3 +397,3 @@ .request(_endpoint) | ||
if (!userScopes) { | ||
return undefined | ||
return false | ||
} | ||
@@ -396,0 +400,0 @@ |
import Vue from 'vue' | ||
import getProp from 'dotprop' | ||
import { parse as parseCookie, serialize as serializeCookie } from 'cookie' | ||
import { isUnset, isSet, decodeValue, encodeValue } from './utilities' | ||
import { isUnset, isSet, decodeValue, encodeValue, getProp } from './utilities' | ||
@@ -6,0 +5,0 @@ export default class Storage { |
@@ -7,3 +7,3 @@ export const isUnset = o => typeof o === 'undefined' || o === null | ||
export const isRelativeURL = u => | ||
u && u.length && /^\/[a-zA-Z0-9@\-%_~][/a-zA-Z0-9@\-%_~]*[?]?([^#]*)#?([^#]*)$/.test(u) | ||
u && u.length && /^\/([a-zA-Z0-9@\-%_~][/a-zA-Z0-9@\-%_~]*)?([?][^#]*)?(#[^#]*)?$/.test(u) | ||
@@ -87,1 +87,28 @@ export const parseQuery = queryString => { | ||
} | ||
/** | ||
* Get property defined by dot notation in string. | ||
* Based on https://github.com/dy/dotprop (MIT) | ||
* | ||
* @param {Object} holder Target object where to look property up | ||
* @param {string} propName Dot notation, like 'this.a.b.c' | ||
* @return {*} A property value | ||
*/ | ||
export function getProp (holder, propName) { | ||
if (!propName || !holder) { | ||
return holder | ||
} | ||
if (propName in holder) { | ||
return holder[propName] | ||
} | ||
const propParts = Array.isArray(propName) ? propName : (propName + '').split('.') | ||
let result = holder | ||
while (propParts.length && result) { | ||
result = result[propParts.shift()] | ||
} | ||
return result | ||
} |
@@ -38,2 +38,5 @@ const { resolve, join, basename } = require('path') | ||
copyPlugin.call(this, { options, strategies, strategyScheme }) | ||
// Transpile nanoid (used for oauth2) for IE11 support (#472) | ||
this.options.build.transpile.push(/^nanoid/) | ||
} | ||
@@ -40,0 +43,0 @@ |
{ | ||
"name": "@nuxtjs/auth", | ||
"version": "4.8.4", | ||
"version": "4.8.5", | ||
"description": "Authentication module for Nuxt.js", | ||
@@ -44,36 +44,36 @@ "license": "MIT", | ||
"dependencies": { | ||
"@nuxtjs/axios": "^5.6.0", | ||
"@nuxtjs/axios": "^5.9.0", | ||
"body-parser": "^1.19.0", | ||
"consola": "^2.10.1", | ||
"consola": "^2.11.2", | ||
"cookie": "^0.4.0", | ||
"dotprop": "^1.2.0", | ||
"is-https": "^1.0.0", | ||
"js-cookie": "^2.2.1", | ||
"lodash": "^4.17.15", | ||
"nanoid": "^2.1.1" | ||
"nanoid": "^2.1.8" | ||
}, | ||
"devDependencies": { | ||
"@nuxtjs/toast": "^3.2.1", | ||
"@nuxtjs/toast": "^3.3.0", | ||
"babel-plugin-transform-class-properties": "^6.24.1", | ||
"babel-plugin-transform-decorators-legacy": "^1.3.5", | ||
"bootstrap-vue": "^2.0.0", | ||
"codecov": "^3.5.0", | ||
"bootstrap-vue": "^2.1.0", | ||
"codecov": "^3.6.1", | ||
"cookie-parser": "^1.4.4", | ||
"eslint": "^6.3.0", | ||
"eslint": "^6.8.0", | ||
"eslint-config-standard": "^14.1.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-jest": "^22.17.0", | ||
"eslint-plugin-node": "^10.0.0", | ||
"eslint-plugin-import": "^2.19.1", | ||
"eslint-plugin-jest": "^23.1.1", | ||
"eslint-plugin-node": "^11.0.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"eslint-plugin-vue": "^5.2.3", | ||
"eslint-plugin-vue": "^6.1.1", | ||
"express": "^4.17.1", | ||
"express-jwt": "^5.3.1", | ||
"jest": "^24.9.0", | ||
"jsdom": "^15.1.1", | ||
"jsdom": "^15.2.1", | ||
"lodash.get": "^4.4.2", | ||
"nuxt-class-component": "^1.3.0", | ||
"nuxt-edge": "^2.10.0-26137453.e9c4bcfe", | ||
"puppeteer": "^1.19.0", | ||
"standard-version": "^7.0.0" | ||
"nuxt-edge": "^2.11.1-26290089.0cb2df73", | ||
"puppeteer": "^2.0.0", | ||
"standard-version": "^7.0.1" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69777
8
1271
23
- Removeddotprop@^1.2.0
- Removeddotprop@1.2.1(transitive)
Updated@nuxtjs/axios@^5.9.0
Updatedconsola@^2.11.2
Updatednanoid@^2.1.8