readme
KKinde
•Created by readme on 11/19/2024 in #💻┃support
Invalid Token Error
In my next.js application i am using next server actions for my api routes protected my kinde. I have mainly 4 routes get, get/id, edit and delete. All the routes work fine except the edit one where it gives me this error:
Note that my kinde debug mode is set to true.
getUser Error [InvalidTokenError]
at eval (webpack-internal:///(rsc)/./node_modules/jwt-decode/build/jwt-decode.esm.js:6:1134)
at (rsc)/./node_modules/jwt-decode/build/jwt-decode.esm.js (C:\Users\harka\OneDrive\Documents\coding\paperless\.next\server\vendor-chunks\jwt-decode.js:40:1)
at __webpack_require__ (C:\Users\harka\OneDrive\Documents\coding\paperless\.next\server\webpack-runtime.js:33:42)
at eval (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:15:68)
at (rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js (C:\Users\harka\OneDrive\Documents\coding\paperless\.next\server\vendor-chunks\@kinde-oss.js:40:1)
at __webpack_require__ (C:\Users\harka\OneDrive\Documents\coding\paperless\.next\server\webpack-runtime.js:33:42)
at eval (webpack-internal:///(rsc)/./src/app/layout.js:13:93)
at (rsc)/./src/app/layout.js (C:\Users\harka\OneDrive\Documents\coding\paperless\.next\server\app\receipts\[id]\page.js:489:1)
at Function.__webpack_require__ (C:\Users\harka\OneDrive\Documents\coding\paperless\.next\server\webpack-runtime.js:33:42)
at async e9 (C:\Users\harka\OneDrive\Documents\coding\paperless\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:35:396491)
at async rU (C:\Users\harka\OneDrive\Documents\coding\paperless\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:39:7365)
at async r2 (C:\Users\harka\OneDrive\Documents\coding\paperless\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:39:17560) {
message: 'Invalid token specified'
}
POST /api/receipts/edit/info/8r5WW52G455NpnRyW500 307 in 67ms
POST /api/auth/login 405 in 16ms
getUser Error [InvalidTokenError]
at eval (webpack-internal:///(rsc)/./node_modules/jwt-decode/build/jwt-decode.esm.js:6:1134)
at (rsc)/./node_modules/jwt-decode/build/jwt-decode.esm.js (C:\Users\harka\OneDrive\Documents\coding\paperless\.next\server\vendor-chunks\jwt-decode.js:40:1)
at __webpack_require__ (C:\Users\harka\OneDrive\Documents\coding\paperless\.next\server\webpack-runtime.js:33:42)
at eval (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js:15:68)
at (rsc)/./node_modules/@kinde-oss/kinde-auth-nextjs/dist/server/index.js (C:\Users\harka\OneDrive\Documents\coding\paperless\.next\server\vendor-chunks\@kinde-oss.js:40:1)
at __webpack_require__ (C:\Users\harka\OneDrive\Documents\coding\paperless\.next\server\webpack-runtime.js:33:42)
at eval (webpack-internal:///(rsc)/./src/app/layout.js:13:93)
at (rsc)/./src/app/layout.js (C:\Users\harka\OneDrive\Documents\coding\paperless\.next\server\app\receipts\[id]\page.js:489:1)
at Function.__webpack_require__ (C:\Users\harka\OneDrive\Documents\coding\paperless\.next\server\webpack-runtime.js:33:42)
at async e9 (C:\Users\harka\OneDrive\Documents\coding\paperless\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:35:396491)
at async rU (C:\Users\harka\OneDrive\Documents\coding\paperless\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:39:7365)
at async r2 (C:\Users\harka\OneDrive\Documents\coding\paperless\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:39:17560) {
message: 'Invalid token specified'
}
POST /api/receipts/edit/info/8r5WW52G455NpnRyW500 307 in 67ms
POST /api/auth/login 405 in 16ms
14 replies
KKinde
•Created by readme on 10/28/2024 in #💻┃support
Next.js Refresh Token null
Hi! In my Next.js application i'm trying to use the refresh token method from
getKindeServerSession()
in my route handler. I have the kinde debug mode set to true
in my env variables. The problem is that i receive a null
value upon logging the value of the refresh token. And I also get an error message that says:
Error: The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Refresh token provided is malformed.
at AuthorizationCode.eval (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthCodeAbstract.js:325:31)
at step (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthCodeAbstract.js:53:23)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthCodeAbstract.js:34:53)
at fulfilled (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthCodeAbstract.js:25:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Error: The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Refresh token provided is malformed.
at AuthorizationCode.eval (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthCodeAbstract.js:325:31)
at step (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthCodeAbstract.js:53:23)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthCodeAbstract.js:34:53)
at fulfilled (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthCodeAbstract.js:25:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
7 replies