-
Notifications
You must be signed in to change notification settings - Fork 26
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
Support different application baseURL than '/' #60
Comments
Hello, Same wish for me :) i saw it today and i need it too on my side. @patrsc do you have any workarround ? |
No, I didn't try any workarounds yet. |
It didn't make it to 1.0.0-beta.1, but it is in the works for one of the betas before 1.0.0! |
I just tried to add a prefix in the nuxt config and everything works as expected including the redirections, as the prefix redirection of nuxt always take place before the route rules go into effect. |
I just updated to 1.0.0-beta.5 and then used an alternate baseURL that works great on a dev build but when doing a build / start to test a production build it fails with a 404 can't find /auth/login If I prepend the baseURL value to the auth/login page that returned the 404, I get the correct login page but when I try to login it fails because it cannot find the auth/oidc/callback with another 404 These paths use the correct prefix in a dev build and it functions perfectly Is there any trick to get this to work on production builds? |
That's very good input! I will include some tests for baseUrl changes, as the e2e tests run on a production build. It should be possible to figure out, why it doesn't work there. |
Thanks! I look forward to your findings on this. If it works on a production build for you maybe there is something I am missing. If not hopefully my input helps you get the issue resolved. |
I'm wondering if there is any movement on this. We are getting ready to go live on the application and it is going to require a baseUrl prefix on the app. I was reading the docs here
"This module can automatically add a global middleware to your Nuxt server. You can enable it by setting I tried to use the redirect set to false but it doesn't seem to do anything as far as stopping the redirects from happening before the and putting up a 404 page (not our 404 page) and although the url path shows up correctly on the location bar the view is still on a 404 page. If I put the cursor in the location bar and hit enter it shows the correct page view. I tried to set globalMiddlewareEnabled: false but that also has ne effect on the redirects that happen without the app baseUrl path being rendered either. Really at a loss as to how to make this work for us with the baseURL set in production builds. |
Nuxt applications allow to be hosted on a different subpath than
'/'
by setting theapp.baseURL
configuration parameter. This can also be overridden at runtime by setting theNUXT_APP_BASE_URL
environment variable.Can this setting (both
app.baseURL
and runtimeNUXT_APP_BASE_URL
) be respected by nuxt-oidc-auth? Currently, I get always redirected to/auth/login
, even when providing a different prefix, e.g.NUXT_APP_BASE_URL=/prefix/
. I believe it would be convenient to automatically prefix all relevant configuration parameters with the App baseURL, for example: If i setoidc.providers.[provider].callbackRedirectUrl
to"/bye"
, then actually I should be redirected to"/prefix/bye"
ifNUXT_APP_BASE_URL=/prefix/
was set.The text was updated successfully, but these errors were encountered: