-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
originEnvKey
not respected when ssr: false
#991
Comments
Solution with |
upd2: I don't think you are setting It should be:
You only have two options with Nuxt, as far as I know:
Also please check if upd1: I think I know how to reproduce an issue similar to yours and potentially fix it. Not sure if it will help you though. I will try to find time for it the next week as part of |
originEnvKey
not respected when ssr: false
I checked |
@phoenix-ru, Can you make an example, where request origin provided from runtime, please? |
Whenever you set nuxt-auth/src/runtime/plugin.ts Lines 20 to 24 in 956b0fa
I would assume that setting |
Environment
I use:
runtimeConfig: { public: { apiBaseUrl: process.env.NUXT_PUBLIC_API_BASE_URL, }, { auth: { originEnvKey: 'NUXT_PUBLIC_API_BASE_URL', provider: { type: 'local', // another configs } } } }
Reproduction
runtimeConfig: { public: { apiBaseUrl: process.env.NUXT_PUBLIC_API_BASE_URL, }, { auth: { originEnvKey: 'NUXT_PUBLIC_API_BASE_URL', provider: { type: 'local', // another configs } } } }
Describe the bug
Nxut3. Don
t work originEnvKey when ssr: false in nuxt.config. Because originEnvKey used just at getServerOrigin function, which in node_modules/@sidebase/nuxt-auth/dist/runtime/server/services/utils.js. There used useRuntimeConfig(). But we don
t have access to config[normalized], because in client at config not private variables from .env.My solution is possible. Add a condition "envVariableName.startsWith(NUXT_PUBLIC_)"
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: