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

nuxt baseURL support #76

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

nuxt baseURL support #76

wants to merge 4 commits into from

Conversation

Flows-git
Copy link

I saw in the issue #60 that the support for nuxt baseURL is planned but not done yet. But we needed it asap for our project. So I decided to fix it. We published this to our company nexus but you can take it if you want.

I realized useRequestFetch, navigateTo , sendRedirect and the callbackRedirectUrl didn't work with correctly with a baseURL set. So I created a function which adds the baseURL to a passed url and added it to the named functions.

You can find the function to parse the URL here.
It tried to store the function in config but that doesn't work and the other files doesn't seem to fit. So I decided to create a new file. Maybe you have a better idea where to store it.

Test
Add NUXT_APP_BASE_URL=/app/ to .env or app: { baseURL: '/app/' } to nuxt.config and start the playground.

I tested it with the keycloak provider only. But it doesn't changes anything with the providers so (I think) there should be no Problem with other providers.

@itpropro
Copy link
Owner

itpropro commented Jan 6, 2025

I was actually not able to reproduce the problem. I set a different baseURL in the nuxt config and all redirections from the composable and from the server continued to work based on how nuxt handles the redirections internally.
Can you provide a reproduction where this problem occurs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants