Welcome to the Kinde community

Updated 3 months ago

Nextjs refresh token returns null

At a glance

A community member is having an issue with the refreshTokens() function in the NextJS documentation, as it is returning null instead of a new refresh token. Other community members suggest upgrading to the latest version of the NextJS SDK (v2.3.10), but the issue persists. The community members are working together to investigate the problem further and provide a solution, but there is no explicitly marked answer yet.

Hey based of nextjs documentation
const { refreshTokens } =getKindeServerSession();
const s = await refreshTokens();
should get me a new refresh token although it is returning null can someone help please?

A
O
10 comments

in addition of that if i'm using nextjs sdk how can i get the refresh token so i can make an oauth2 api so i can get new token?

Hey ,
What NextJS SDK version are you using? And are you using NextJS App Router or Pages Router?

Hey
I'm using version 2.3.4 and its NextJS App Router

Hey ,
Thanks for getting back to me.
Are you able to update to the latest version of the NextJS SDK v2.3.10 and let me know if you are still experiencing this issue?

Hello
gonna try it and get back to you
thanks

Hello again
i tried moving to the version mentioned above but no luck still nothing changed !

Sorry to hear that upgrading didn't work.
I spoke to my teammate earlier today on this issue and I think we may know what the issue is.
I will get back to you tomorrow with more information

Pleasure. Sorry about the inconvenience again.

Hey ,
We are going to give this issue more attention early next week.
I will continue to update you as we progress with solving your issue - apologies again.

Add a reply
Sign up and join the conversation on Slack