Open skeet opened 6 years ago
This DB call isn't needed: https://github.com/shouheiyamauchi/react-passport-example/blob/6fc204bca2a1680f83be78b0ccb2b26cfee4a041/server/middleware/auth-check.js#L25
A valid, short-lived JWT should be enough to access an endpoint - you're getting no benefit if your middleware is doing a DB call every request...
This DB call isn't needed: https://github.com/shouheiyamauchi/react-passport-example/blob/6fc204bca2a1680f83be78b0ccb2b26cfee4a041/server/middleware/auth-check.js#L25
A valid, short-lived JWT should be enough to access an endpoint - you're getting no benefit if your middleware is doing a DB call every request...