I am using the Spotify credentials provider. I want the exp timestamp on the JWT issued by my site to match the expiry timestamp on the access token issued by Spotify.
Using the next-auth package, the jwt() and session() callbacks are fired every time I leave the tab and return to it. Is this the intended behavior? Further, every time this happens, the iat and exp timestamps are updated. While I could add another property, I wanted to use the exp property which already exists, but the callbacks run and the timestamps update every time the session is updated. I assume means a new token is being issued. I only want the timestamps to update when the user signs in or the Spotify token is refreshed.