This is the Template for creating authentication api in Node Js. I have published it for my personal use but you guys can edit it according to your needs. You can use Redis for caching and expiring Refresh token.
himal-rawal/Express-js-api-Authentication-Template-
This is template for api Authentication using ExpressJS and Mongodb.
JavaScript