Refactor the auth middleware to support refresh-token rotation, and show me the diff before applying.
On it. I'll rotate refresh tokens on each use and invalidate the prior token server-side. Inspecting the current middleware first.
export async function requireAuth(req, res, next){
const token = readBearer(req)
const claims = verify(token) // ← no rotation today
req.user = claims.sub
next()
}Now drafting the rotation logic and a backing store for the token family
Spin up a specialised agent — give it a model, tools, and a system prompt. It'll show up here, ready to run.
Loading review…