This is a simple authentication API using ExpressJS. Currently, it only provides an access token when a user signs in.
The API provides 3 routes:
POST /user/signin: Parses theemailandpasswordin the request body. If credentials are correct, an access token cookie is set.POST /user/signup: Parses theusername,email, andpasswordfields of the request body. If the email already exists, status codeBAD REQUESTis sent. Otherwise,INTERNAL SERVER ERRORis sent if another kind of error occured orCREATEDif the signup was successful.GET /dashboard: Simulates a dashboard. An access token cookie is expected in HTTP request. If the token isn't valid, a response withUNAUTHORIZEDstatus code is sent.