I have a front-end angularJS server that is getting data from a back-end nodeJS server from MySQL DB via middleware. I created a front-end simple login form that needs to send data for authentication to the back-end server (checks if user exists in the db). The back-end server returns user details in the case that the user is found in the DB or prints error login message or redirect to signup screen.
I'm looking for a guide or example on how to create a correct authentication system with sessions and cookies between the two servers.
Thank you.