Open mfrascati opened 2 years ago
module: auth-next@^5.0.0-1643791578.532b3d6 nuxt: 2.15.8
auth: { strategies: { google: { clientId: "xxxx", codeChallengeMethod: "", responseType: "code", redirectUri: frontEndUrl + "/oauth/google", }, }, redirect: { login: "/login", logout: false, callback: false, home: false, }, rewriteRedirects: true, },
As mentioned by the docs: Each redirect path can be disabled by setting to false. Also you can disable all redirects by setting redirect to false
Each redirect path can be disabled by setting to false. Also you can disable all redirects by setting redirect to false
If I set the callback redirect to false the module still tries to fetch it as it only checks if the whole redirect object is set
false
async _handleCallback() { if (this.$auth.options.redirect && normalizePath(this.$auth.ctx.route.path, this.$auth.ctx) !== normalizePath(this.$auth.options.redirect.callback, this.$auth.ctx)) { return; }
Then normalizePath gets as first param false and throws an error
Not sure why, if I call the method a second time it prepends the false with // and //false becomes an acceptable string param for normalizePath and it works.
//false
Version
module: auth-next@^5.0.0-1643791578.532b3d6 nuxt: 2.15.8
Nuxt configuration
mode:
Nuxt configuration
What is expected?
As mentioned by the docs:
Each redirect path can be disabled by setting to false. Also you can disable all redirects by setting redirect to false
What is actually happening?
If I set the callback redirect to
false
the module still tries to fetch it as it only checks if the whole redirect object is setThen normalizePath gets as first param
false
and throws an errorNot sure why, if I call the method a second time it prepends the
false
with // and//false
becomes an acceptable string param for normalizePath and it works.