Welcome to the Kinde community.

K
A
A
A
M

TypeScript SDK issue

Does anyone know where this error comes from ?
Plain Text
 ✓ Compiled /api/auth/[kindeAuth] in 272ms (896 modules)
Error: Cannot get user details, no authentication credential found
    at eval (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/clients/server/authorization-code.js:310:35)
    at step (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/clients/server/authorization-code.js:123:23)
    at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/clients/server/authorization-code.js:64:20)
    at fulfilled (webpack-internal:///(rsc)/./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/clients/server/authorization-code.js:27:32)
O
l
G
7 comments
Starting a thread here to consolidate the infromation on this issue.
@GlobalSystemMediaTransportContro said this:
just a hunch but this looks to be the authz code not being passed the auth creds from the authd code which would imply a bug with kinde
unless they conflated authz with authd... naughty!
I will pass this issue onto my TypeScript expert teammate tomorrow (Monday).
@IkiTg07 This error occurs when calling getUser() to retrieve user details and there is no user logged in. For reference, the location in source is here.

If there is any further context you can provide? Looks like this is perhaps a Next.js app?
I do have a question - how come this happens within authorization code? Shouldn't it throw a bit sooner?
In the context of the TypeScript SDK, the referenced file contains a client that implements the authorization code flow, with methods used to initiate and complete the flow. The getUser() function checks whether the user is authenticated as the first thing, when this is called in the overall flow depends on the calling code, as the provided stack trace doesn't show beyond the TS SDK, it is hard to say whether there is an appropriate earlier location to check.
Add a reply
Sign up and join the conversation on Discord
Join