Skip to content
Permalink
Browse files
feat(redirect): add full path redirect option (#96)
  • Loading branch information
manniL authored and pi0 committed Mar 13, 2018
1 parent 9a0dcdb commit ca8785f89f4b80abdc75aac54fb55e49ea088f9c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
@@ -66,6 +66,12 @@ If enabled, user will be automatically logged out if any error happens. (For exa

If enabled, user will redirect back to the original guarded route instead of `redirect.home`.

### `fullPathRedirect`

Default: `false`

If true, use the full route path with query parameters for redirect

### `vuex.namespace`

* Default: `auth`
@@ -435,7 +435,7 @@ export default class Auth {
return
}

const from = this.ctx.route.path
const from = this.options.fullPathRedirect ? this.ctx.route.path : this.ctx.route.fullPath

let to = this.options.redirect[name]
if (!to) {
@@ -13,6 +13,8 @@ module.exports = {

rewriteRedirects: true,

fullPathRedirect: false,

redirect: {
login: '/login',
logout: '/',

0 comments on commit ca8785f

Please sign in to comment.