Comments (1)
After digging around in the code and reading the deployment docs, I found that Nuxt does not use the .env file when building for production.
o fix this issue, I used the kinde options in the nuxt.config.ts file as shown below:
export default defineNuxtConfig({
devtools: { enabled: true },
nitro: {
preset: "cloudflare-pages",
},
kinde: {
debug: true,
password: process.env.NUXT_KINDE_PASSWORD,
authDomain: process.env.NUXT_KINDE_AUTH_DOMAIN,
clientId: process.env.NUXT_KINDE_CLIENT_ID,
redirectURL: process.env.NUXT_KINDE_REDIRECT_URL,
logoutRedirectURL: process.env.NUXT_KINDE_LOGOUT_REDIRECT_URL,
postLoginRedirectURL: process.env.NUXT_KINDE_POST_LOGIN_REDIRECT_URL,
clientSecret: process.env.NUXT_KINDE_CLIENT_SECRET,
audience: process.env.NUXT_KINDE_AUDIENCE,
},
modules: [
"nitro-cloudflare-dev",
"nuxt-typed-router",
"@nuxtjs/tailwindcss",
"@vueuse/nuxt",
"@formkit/auto-animate",
"@nuxtjs/color-mode",
"dayjs-nuxt",
"nuxt-icon",
"@nuxtjs/kinde",
"./modules/my-app-module",
],
colorMode: {
classSuffix: "",
preference: "light",
fallback: "light",
},
});
This approach ensures that the environment variables are correctly passed to the Nuxt configuration in production.
from kinde.
Related Issues (20)
- [500] Authentication flow state not found in Safari HOT 1
- Error 500 when logging in: user must be a string. HOT 5
- Redirect URL/route for un-authenticated users HOT 4
- Can I use this module by logging in with my username and password? I didn't find any relevant documentation for this
- Protect Nuxt (Nitro) API routes HOT 2
- `useRuntimeConfig is not defined` HOT 4
- Error: Could not load HOT 3
- The package doesn't work with disabled SSR HOT 3
- useKindeClient incorrect type
- api callback in nuxt HOT 1
- useAuth in pinia store HOT 2
- Huge amount of rewriting during build HOT 2
- NUXT_KINDE_LOGOUT_REDIRECT_URL doesn't seem to be taken into account HOT 1
- Are the internal routes configurable
- Setting an audience for authentication tokens HOT 1
- useKindeClient can't import on server side HOT 2
- [ERROR] [nuxt] [request error] [unhandled] [500] Invalid URL string. HOT 1
- User information available on server HOT 1
- getUser is blowing up in server handler HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kinde.