How to refresh JWT manually

I understand that the JWT may expire before the session expires. In this case, I check whether the JWT is expired before I issue a new JWT.

I've tried this method so far but no avail:
  • getting the session using the expired jwt so I can call api.getToken by placing the session token but no avail as calling getSession only returns null
For context, I am using bearer() and jwt() plugin together. And I am using a full-fledged authorization server where there is no client-side better-auth sdk
Was this page helpful?