Whats the best way to update the session payload? ...
# support-questions-legacy
e
Whats the best way to update the session payload? we got a /api/auth/renew endpoint with this logic
Copy code
js
      const newSessionPayload = await createSessionPayload({
        res,
        userContext: {},
        userId: session.getUserId(),
        sessionData: session.getSessionData(),
      })

    await session.mergeIntoAccessTokenPayload(newSessionPayload as JSONObject)

// (this is what we did)
   // await session.updateAccessTokenPayload(newSessionPayload, {})
Seems like this is the way, but on production we dont get a response cookie back?
3 Views