Open janhenkes opened 2 years ago
Try it as a temporary workaround this.
// middleware/trailing-slash.js
export default ({ route, redirect }) => {
if (route.path.slice(-1) !== '/') redirect(301, route.path + '/')
}
// nuxt.config.js
{
// ...
router: {
trailingSlash: true,
middleware: ['trailing-slash'],
},
// ...
}
Version
module: nuxt:
Nuxt configuration
mode:
Nuxt configuration
Additional information
We have the trailingSlash option in Nuxt set to true (https://nuxtjs.org/docs/configuration-glossary/configuration-router#trailingslash). We have searched through the code and found the normalizePath function which removes the trailing slash. This should not happen if Nuxt is configured to force trailing slashes. https://github.com/nuxt-community/auth-module/blob/5.0.0-dev/src/utils/index.ts#L67
What is expected?
I expect that after authorization the user is redirect tot /callback/?code=XXX.
What is actually happening?
The user is redirected to /callback?code=XXX.
Checklist