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

@nuxtjs/auth

Package Overview
Dependencies
Maintainers
4
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxtjs/auth - npm Package Compare versions

Comparing version 4.0.2 to 4.1.0

10

CHANGELOG.md

@@ -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)

12

lib/schemes/local.js

@@ -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",

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