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

Support different application baseURL than '/' #60

Open
patrsc opened this issue Sep 28, 2024 · 4 comments
Open

Support different application baseURL than '/' #60

patrsc opened this issue Sep 28, 2024 · 4 comments
Labels

Comments

@patrsc
Copy link

patrsc commented Sep 28, 2024

Nuxt applications allow to be hosted on a different subpath than '/' by setting the app.baseURL configuration parameter. This can also be overridden at runtime by setting the NUXT_APP_BASE_URL environment variable.

Can this setting (both app.baseURL and runtime NUXT_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 set oidc.providers.[provider].callbackRedirectUrl to "/bye", then actually I should be redirected to "/prefix/bye" if NUXT_APP_BASE_URL=/prefix/ was set.

@schinois
Copy link

Hello,

Same wish for me :) i saw it today and i need it too on my side. @patrsc do you have any workarround ?

@patrsc
Copy link
Author

patrsc commented Oct 1, 2024

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.

@itpropro itpropro added the enhancement New feature or request label Oct 3, 2024
@itpropro
Copy link
Owner

itpropro commented Oct 3, 2024

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!

@itpropro
Copy link
Owner

itpropro commented Jan 5, 2025

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.
Is there anything specific that is not working for you @patrsc ?

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

3 participants