🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

redux-auth-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-auth-wrapper - npm Package Compare versions

Comparing version

to
2.0.2

21

helper/redirect.js

@@ -41,3 +41,4 @@ 'use strict';

var allArgs = _extends({}, connectedDefaults, args);
var redirectPath = allArgs.redirectPath,
var FailureComponent = allArgs.FailureComponent,
redirectPath = allArgs.redirectPath,
authenticatedSelector = allArgs.authenticatedSelector,

@@ -81,2 +82,8 @@ authenticatingSelector = allArgs.authenticatingSelector,

var ConnectedFailureComponent = (0, _reactRedux.connect)(function (state, ownProps) {
return {
redirect: redirect(getRouterRedirect(ownProps))
};
})(FailureComponent);
return function (DecoratedComponent) {

@@ -87,6 +94,5 @@ return (0, _reactRedux.connect)(function (state, ownProps) {

isAuthenticated: authenticatedSelector(state, ownProps),
isAuthenticating: authenticatingSelector(state, ownProps),
redirect: redirect(getRouterRedirect(ownProps))
isAuthenticating: authenticatingSelector(state, ownProps)
};
})((0, _authWrapper2.default)(allArgs)(DecoratedComponent));
})((0, _authWrapper2.default)(_extends({}, allArgs, { FailureComponent: ConnectedFailureComponent }))(DecoratedComponent));
};

@@ -97,3 +103,4 @@ };

var allArgs = _extends({}, connectedDefaults, args);
var redirectPath = allArgs.redirectPath,
var FailureComponent = allArgs.FailureComponent,
redirectPath = allArgs.redirectPath,
authenticatedSelector = allArgs.authenticatedSelector,

@@ -140,2 +147,4 @@ authenticatingSelector = allArgs.authenticatingSelector,

var ConnectedFailureComponent = (0, _reactRedux.connect)(null, createRedirect)(FailureComponent);
return function (DecoratedComponent) {

@@ -148,3 +157,3 @@ return (0, _reactRedux.connect)(function (state, ownProps) {

};
}, createRedirect)((0, _authWrapper2.default)(allArgs)(DecoratedComponent));
})((0, _authWrapper2.default)(_extends({}, allArgs, { FailureComponent: ConnectedFailureComponent }))(DecoratedComponent));
};

@@ -151,0 +160,0 @@ };

{
"name": "redux-auth-wrapper",
"version": "2.0.1",
"version": "2.0.2",
"main": "index.js",

@@ -12,3 +12,3 @@ "description": "A utility library for handling authentication and authorization for redux and react-router",

"dist:prepare": "npm run build:clean && npm run build && npm run build:copyFiles",
"lint": "eslint src test",
"lint": "eslint src test examples",
"test": "mocha --compilers js:babel-core/register --recursive --require test/init.js test/authWrapper-test.js",

@@ -67,5 +67,5 @@ "test:cov": "babel-node --max-old-space-size=4076 $(npm bin)/babel-istanbul cover $(npm bin)/_mocha -- --require test/init.js test/authWrapper-test.js",

"lodash.isempty": "4.4.0",
"prop-types": "15.5.8",
"prop-types": "^15.5.0",
"query-string": "4.3.4"
}
}