auth-module icon indicating copy to clipboard operation
auth-module copied to clipboard

Check for existing route query params on redirect

Open Sheby opened this issue 8 years ago • 2 comments

Hello. Any chance of making this change on master. File is: https://github.com/nuxt-community/auth-module/blob/master/lib/templates/auth.class.js Line 311.

Change it from

if (name === 'login') {
    to = to + '?redirect=' + encodeURIComponent(from)
}

To

if (name === 'login') {
    let sign = /\?/.test(to) ?  '&' : '?'
    to = to + sign +'redirect=' + encodeURIComponent(from)
}
This question is available on Nuxt.js community (#c60)

Sheby avatar Mar 02 '18 13:03 Sheby

@Sheby Should be fixed in the dev branch.

TheAlexLichter avatar Mar 12 '18 18:03 TheAlexLichter

4.0.0 released! (Now it uses localStorage to memorize redirectBack URL)

pi0 avatar Apr 02 '18 15:04 pi0