itpropro / nuxt-oidc-auth

OIDC (OpenID connect) focused auth module for Nuxt
https://nuxtoidc.cloud
MIT License
84 stars 22 forks source link

Support different application baseURL than '/' #60

Open patrsc opened 1 month ago

patrsc commented 1 month ago

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 commented 1 month ago

Hello,

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

patrsc commented 1 month ago

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 commented 1 month ago

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!