KindeK
Kinde16mo ago
27 replies
Abel Trần

Issue with getKindeServerSession().refreshTokens(); in Next.js App Router

I am currently integrating Kinde with a Next.js application using the App Router. In my application, when a user logs in and successfully completes a payment transaction, I would like to set new properties for the user as paid user. However, I am encountering an issue when attempting to refresh the ID token using the method getKindeServerSession().refreshTokens();. It seems I am unable to fetch a new ID token after updating the user's properties.

Could you please provide guidance on how to resolve this issue or recommend an alternative approach for refreshing the ID token in this context?

Thank you!
Was this page helpful?