This was meant for the react-stormpath repository.
This is a proposed enhancement, not a bug.
In a situation where the server replies with a 401 (for example, if you are using express-stormpath to validate AccessTokens,) it would be very useful to have a built-in way to push the login path with the "?next" parameter set to a prescribed path.
This was meant for the react-stormpath repository.
This is a proposed enhancement, not a bug.
In a situation where the server replies with a 401 (for example, if you are using express-stormpath to validate AccessTokens,) it would be very useful to have a built-in way to push the login path with the "?next" parameter set to a prescribed path.
this.props.router.pushLoginRoute('/mypreviouspath');
This can currently be achieved with
this.props.router.push('/myloginpath?next=' + encodeURIComponent('/mypreviouspath'));
which is a bit messy.