@nuxtjs/auth
Advanced tools
Comparing version 4.0.2 to 4.1.0
@@ -5,7 +5,13 @@ # Change Log | ||
<a name="4.0.2"></a> | ||
## [4.0.2](https://github.com/nuxt-community/auth-module/compare/v4.0.1...v4.0.2) (2018-04-09) | ||
<a name="4.1.0"></a> | ||
# [4.1.0](https://github.com/nuxt-community/auth-module/compare/v4.0.1...v4.1.0) (2018-04-09) | ||
### Features | ||
* **scheme/oauth2:** add option to use IdToken instead of AccessToken ([#121](https://github.com/nuxt-community/auth-module/issues/121)) ([554a042](https://github.com/nuxt-community/auth-module/commit/554a042)) | ||
* add support for logging out without an API endpoint ([#124](https://github.com/nuxt-community/auth-module/issues/124)) ([6189c6d](https://github.com/nuxt-community/auth-module/commit/6189c6d)) | ||
<a name="4.0.1"></a> | ||
@@ -12,0 +18,0 @@ ## [4.0.1](https://github.com/nuxt-community/auth-module/compare/v4.0.0...v4.0.1) (2018-04-03) |
@@ -76,10 +76,10 @@ export default class LocalScheme { | ||
async logout (endpoint) { | ||
if (!this.options.endpoints.logout) { | ||
return | ||
// Only connect to logout endpoint if it's configured | ||
if (this.options.endpoints.logout) { | ||
await this.$auth | ||
.requestWith(this.name, endpoint, this.options.endpoints.logout) | ||
.catch(() => { }) | ||
} | ||
await this.$auth | ||
.requestWith(this.name, endpoint, this.options.endpoints.logout) | ||
.catch(() => { }) | ||
// But logout locally regardless | ||
if (this.options.tokenRequired) { | ||
@@ -86,0 +86,0 @@ this._clearToken() |
@@ -91,4 +91,4 @@ import { encodeQuery, parseQuery, randomString } from '../utilities' | ||
// accessToken | ||
let accessToken = parsedQuery.access_token | ||
// accessToken/idToken | ||
let token = parsedQuery[this.options.token_key || 'access_token'] | ||
@@ -106,7 +106,7 @@ // -- Authorization Code Grant -- | ||
if (data.access_token) { | ||
accessToken = data.access_token | ||
token = data.access_token | ||
} | ||
} | ||
if (!accessToken || !accessToken.length) { | ||
if (!token || !token.length) { | ||
return | ||
@@ -124,7 +124,7 @@ } | ||
if (this.options.token_type) { | ||
accessToken = this.options.token_type + ' ' + accessToken | ||
token = this.options.token_type + ' ' + token | ||
} | ||
// Store token | ||
this.$auth.setToken(this.name, accessToken) | ||
this.$auth.setToken(this.name, token) | ||
@@ -131,0 +131,0 @@ // Redirect to home |
{ | ||
"name": "@nuxtjs/auth", | ||
"version": "4.0.2", | ||
"version": "4.1.0", | ||
"description": "Authentication module for Nuxt.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
45913
1003