🚀 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
1.0.0

7

CHANGELOG.md

@@ -1,5 +0,8 @@

## [HEAD](https://github.com/mjrussell/redux-auth-wrapper/compare/v0.10.0...master)
## [HEAD](https://github.com/mjrussell/redux-auth-wrapper/compare/v1.0.0...master)
## [1.0.0](https://github.com/mjrussell/redux-auth-wrapper/compare/v0.10.0...v1.0.0)
- **Bugfix:** Redirection preserves query params in the redirect path. [#111](https://github.com/mjrussell/redux-auth-wrapper/pull/111)
## [0.10.0](https://github.com/mjrussell/redux-auth-wrapper/compare/v0.9.0...v0.10.0)
- **Feature:** `allowRedirectBack` can also take a selector function that returns a bool instead of a bool. [#93](https://github.com/mjrussell/redux-auth-wrapper/pull/93)
- **Feature:** `allowRedirectBack` can also take a selector function that returns a bool instead of a bool. [#93](https://github.com/mjrussell/redux-auth-wrapper/pull/93) (Contributed by @oyeanuj)

@@ -6,0 +9,0 @@ ## [0.9.0](https://github.com/mjrussell/redux-auth-wrapper/compare/v0.8.0...v0.9.0)

@@ -26,2 +26,6 @@ 'use strict';

var _url = require('url');
var _url2 = _interopRequireDefault(_url);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -84,2 +88,4 @@

var createRedirect = function createRedirect(location, redirect, redirectPath) {
var redirectLoc = _url2.default.parse(redirectPath, true);
var query = void 0;

@@ -94,4 +100,6 @@ var canRedirect = typeof allowRedirectBack === 'function' ? allowRedirectBack(location, redirectPath) : allowRedirectBack;

query = _extends({}, query, redirectLoc.query);
redirect({
pathname: redirectPath,
pathname: redirectLoc.pathname,
query: query

@@ -98,0 +106,0 @@ });

{
"name": "redux-auth-wrapper",
"version": "0.10.0",
"version": "1.0.0",
"description": "A utility library for handling authentication and authorization for redux and react-router",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -13,4 +13,3 @@ # redux-auth-wrapper

**Versioning Note:** This project adheres to [semver](http://semver.org/). Before version 1.0 there may be breaking versions between
minor versions (e.g. 0.4 -> 0.5). There will never be any breaking changes for bug version upgrades (e.g. 0.4.0 -> 0.4.1). Please view the [Changelog](/CHANGELOG.md) for release notes.
**Versioning Note:** This project adheres to [semver](http://semver.org/). Please view the [Changelog](/CHANGELOG.md) for release notes.

@@ -17,0 +16,0 @@ ## Contents

@@ -5,2 +5,3 @@ import React, { Component, PropTypes } from 'react'

import isEmpty from 'lodash.isempty'
import url from 'url'

@@ -29,2 +30,4 @@ const defaults = {

const createRedirect = (location, redirect, redirectPath) => {
const redirectLoc = url.parse(redirectPath, true)
let query

@@ -39,4 +42,9 @@ const canRedirect = typeof allowRedirectBack === 'function' ? allowRedirectBack(location, redirectPath) : allowRedirectBack

query = {
...query,
...redirectLoc.query
}
redirect({
pathname: redirectPath,
pathname: redirectLoc.pathname,
query

@@ -43,0 +51,0 @@ })