Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query parameters lost in redirect with fullPathRedirect enabled #1828

Open
2 of 5 tasks
izumiya opened this issue Feb 10, 2023 · 0 comments
Open
2 of 5 tasks

Query parameters lost in redirect with fullPathRedirect enabled #1828

izumiya opened this issue Feb 10, 2023 · 0 comments
Labels

Comments

@izumiya
Copy link

izumiya commented Feb 10, 2023

Version

module: 5.0.0-1637745161.ea53f98
nuxt: 2.15.8

Nuxt configuration

  router: {
    base: '/app/',
    // ...
  },
  auth: {
    fullPathRedirect: true,
    // ...
  }

mode:

  • universal
  • spa

Reproduction

What is expected?

The query parameters should not be lost when redirected to a URL after login.

What is actually happening?

Query parameters are being lost.

Steps to reproduce

  1. In nuxt.config.js, set the router.base to a subdirectory, such as /app/.
  2. Enable fullPathRedirect in the auth configuration.
  3. Access a URL with query parameters while not logged in (e.g. https://localhost/app/foo?bar=123).
  4. After completing the login and callback, the URL will open without the query parameters (e.g. https://localhost/app/foo).

Additional information

The problem is caused by normalizePath being executed on the URL retrieved by this.$storage.getUniversal('redirect').
I have created a pull request at #1827 to resolve this issue.

Checklist

  • I have tested with the latest Nuxt version and the issue still occurs
  • I have tested with the latest module version and the issue still occurs
  • I have searched the issue tracker and this issue hasn't been reported yet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant