kinde-oss / kinde-auth-nextjs

Kinde NextJS SDK - authentication for server rendered apps
https://kinde.com/docs/developer-tools/nextjs-sdk/
MIT License
132 stars 17 forks source link

refreshTokens in Next.js results in ReferenceError: config is not defined #161

Closed gitdagray closed 1 month ago

gitdagray commented 1 month ago

Prerequisites

Describe the issue

Wanted to try out the new refreshTokens as documented here: https://docs.kinde.com/developer-tools/sdks/backend/nextjs-sdk/#refreshing-kinde-data

await refreshTokens() ...always results in "ReferenceError: config is not defined"

Poked around in the repo: https://github.com/kinde-oss/kinde-auth-nextjs/blob/55de0cae4618fb83bb27d23faa616ec9cebbbff0/src/session/index.js

I don't see where the config object that is accessed on line 35 is defined or imported. It would only reach that spot if another error occurred, but I can't see what that might be yet.

Library URL

https://github.com/kinde-oss/kinde-auth-nextjs

Library version

2.2.6

Operating system(s)

Windows

Operating system version(s)

Windows 10 Pro

Further environment details

No response

Reproducible test case URL

No response

Additional information

No response

DanielRivers commented 1 month ago

Thanks for raising this.

Your investigation is very helpful, I will likely remove the config check and always console output the error as this is helpful in all situations.

DanielRivers commented 1 month ago

Fixed in 2.2.7