This is based on a previous blog post using Golang, so anyone that is interested how to do this in Go, please check it here
Sometimes, building your own authentication REST API sounds scary but in this post, I'll show you how it's done using Node.js ...