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

@mapomodule/core

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mapomodule/core - npm Package Compare versions

Comparing version 1.0.0-alpha.18 to 1.0.0-alpha.19

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [1.0.0-alpha.19](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.18...v1.0.0-alpha.19) (2022-04-06)
### Bug Fixes
* fix logout loop ([3177cca](https://github.com/lotrekagency/mapo/commit/3177ccaf4be6151feec379c4241f8784b79d4361))
# [1.0.0-alpha.18](https://github.com/lotrekagency/mapo/compare/v1.0.0-alpha.17...v1.0.0-alpha.18) (2022-04-04)

@@ -8,0 +19,0 @@

8

interceptor/auth.js
module.exports = ({ $axios, store }) => {
if ($axios && store){
if ($axios && store) {
$axios.onRequest((config) => {

@@ -10,3 +10,3 @@ const token = store.getters['mapo/user/token']

})
$axios.onResponse((response) => {

@@ -24,3 +24,5 @@ if (response.status === 401) {

const { status, request } = error.response || {}
if (status === 401 && (request || {}).path !== '/api/auth/logout') {
const baseURL = ($axios.defaults.baseURL || "").replace(/https?:\/\/[^\/]+/i, "")
const logoutPath = `${baseURL.endsWith("/") ? baseURL : baseURL + "/"}${process.env.AUTH_LOGIN_URL || "api/auth/logout"}`
if (status === 401 && (request || {}).path !== logoutPath) {
store.dispatch('mapo/user/logout')

@@ -27,0 +29,0 @@ }

{
"name": "@mapomodule/core",
"version": "1.0.0-alpha.18",
"version": "1.0.0-alpha.19",
"description": "This is part of Mapo nuxt module. Injects the core mapo plugin helpers.",

@@ -21,3 +21,3 @@ "author": "bnznamco <gabriele.baldi.01@gmail.com>",

},
"gitHead": "1b05e625339b6ee6ed0e238739cc31fbd84f3397"
"gitHead": "3bc598b7ecb64c67a164b438847eb237f78efc75"
}
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