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

co-auther

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

co-auther - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

2

package.json
{
"name": "co-auther",
"version": "0.0.7",
"version": "0.0.8",
"description": "",

@@ -5,0 +5,0 @@ "main": "src/co-auther/co-auther.js",

var dontTouchLocalStorage = false;
var terminalRoute = null;
var initialRequestFailed = false;
var coAuther;

@@ -46,3 +47,3 @@ function basicRouting(afterHash) {

canActivate = currentPage === destinationRoute;
if (!initialRequestPending) {
if (!initialRequestPending && !initialRequestFailed) {
initialRequestPending = true;

@@ -59,4 +60,5 @@ getCoAuther().makeInitialRequestWrap()

.catch(function () {
// initial request failed, clear auth data from login and go to authenticate
initialRequestPending = false;
// initial request failed, clear auth data from login and go to authenticate
initialRequestFailed = true;
clearAuthData();

@@ -66,2 +68,5 @@ return routeFunction(config.AUTHENTICATE);

}
else if (initialRequestFailed && authData) {
console.error('You have manual authData management but haven\'t cleared it manually after failed initialRequest');
}
}

@@ -94,2 +99,3 @@ if (!canActivate) {

}
initialRequestFailed = false; // reset this one
return apiService.login.apply(apiService, args)

@@ -96,0 +102,0 @@ .then(function (res) {

let dontTouchLocalStorage = false
let terminalRoute = null
let initialRequestFailed = false
let coAuther

@@ -44,3 +45,3 @@ function basicRouting (afterHash) {

canActivate = currentPage === destinationRoute
if (!initialRequestPending) {
if (!initialRequestPending && !initialRequestFailed) {
initialRequestPending = true

@@ -57,7 +58,10 @@ getCoAuther().makeInitialRequestWrap()

.catch(() => {
// initial request failed, clear auth data from login and go to authenticate
initialRequestPending = false
// initial request failed, clear auth data from login and go to authenticate
initialRequestFailed = true
clearAuthData()
return routeFunction(config.AUTHENTICATE)
})
} else if (initialRequestFailed && authData) {
console.error('You have manual authData management but haven\'t cleared it manually after failed initialRequest')
}

@@ -88,2 +92,3 @@ }

function loginWrap (...args) {
initialRequestFailed = false // reset this one
return apiService.login.apply(apiService, args)

@@ -90,0 +95,0 @@ .then((res) => {

Sorry, the diff of this file is not supported yet

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