K
Kinde12mo ago
IyanSR

Authentication flow state not found with NextJS Middleware

Hello, I had issue when combining NextJS Middleware and Kinde I got error when successfull Signin / Register, and Kinde trying to navigate to callback http://localhost:3000/api/auth/kinde_callback . Error looks like this:
⨯ Error: Authentication flow state not found
at AuthorizationCode.eval (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:285:35)
at step (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:132:23)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:73:20)
at fulfilled (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:36:32)
⨯ Error: Authentication flow state not found
at AuthorizationCode.eval (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:285:35)
at step (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:132:23)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:73:20)
at fulfilled (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:36:32)
I found similar issue on github https://github.com/kinde-oss/kinde-auth-nextjs/issues/86 ,but seems like not solved yet. One of the comment on the issue says need to change the matcher, Currently my matcher looks like the attched image. Any help would be appreciated
GitHub
Bug: Authentication flow state · Issue #86 · kinde-oss/kinde-auth-n...
Prerequisites I have searched the repository’s issues and Kinde community to ensure my issue isn’t a duplicate I have checked the latest version of the library to replicate my issue I have read the...
No description
5 Replies
IyanSR
IyanSROP12mo ago
More attachement:
No description
Oli - Kinde
Oli - Kinde12mo ago
Hey @IyanSR, Thanks for reaching out on this issue. I can see you reached out about the same issue in our Slack community here. Let's continue the conversation in the Slack community.
IyanSR
IyanSROP12mo ago
Thank you, yes, i decided to move to slack
Sebastian Simionescu
Hello, what was the fix for this issue ? I’m having the same issue and I’m not sure how to solve it @Oli - Kinde
onderay
onderay11mo ago
@Sebastian Simionescu looking through the chat. The issue was by fixing the middleware and also adding callback url on kinde application.
No description
Want results from more Discord servers?
Add your server