aborn / nuxt-openid-connect

OpenID-Connect(OIDC) integration module for nuxt 3.0.
31 stars 16 forks source link

Login redirection logic not working when the site is in an sub directory #33

Closed devmodernenglish closed 1 month ago

devmodernenglish commented 1 month ago

Hi,

We've encountered an issue during the login flow. When the flow is invoked, the user is redirected to /oidc/login before going to the issuer URL. However, this logic does not account for sites running in a subdirectory and assumes the site is running at the root of the domain (i.e., when NUXT_APP_BASE_URL is not simply /). Additionally, we cannot use router middleware to fix the destination path, as it seems to use window.location instead of any Nuxt functionality. Could you advise on a workaround or allow settings to prepend NUXT_APP_BASE_URL to the internal URLs?

Kind regards, Modern English

aborn commented 1 month ago

Current this doesn't consider the params baseURL , i will fix the problem.

aborn commented 1 month ago

v0.8.0 package fix this problem.

timadevelop commented 1 month ago

@aborn could you please take a look at the comments I left in https://github.com/aborn/nuxt-openid-connect/commit/0052d6eaf8386989a4a5e93123e574cb8abc9d0f#r143506013