appy-one / acebase-server

A fast, low memory, transactional, index & query enabled NoSQL database server for node.js that easily syncs with browser and node.js clients and servers
MIT License
32 stars 14 forks source link

FR: add ability to use built-in authentication for custom routes #60

Closed donl closed 1 year ago

donl commented 1 year ago

Looking to be able to use the built-in authentication on endpoints created by server.extend and server.app to check if a request is from an authenticated user or not.

appy-one commented 1 year ago

You should be able to use req.user for this purpose. If the user is signed in, it will contain the user details, null otherwise.

donl commented 1 year ago

Ahh! That looks perfect! Thanks