Build MEAN stack JWT Authentication & Authorization example with HttpOnly Cookie and JWT.
For JWT β Token based Authentication with Rest API, weβre gonna call 2 endpoints:
- POST
api/auth/signup
for User Registration - POST
api/auth/signin
for User Login - POST
api/auth/signout
for User Logout
You can take a look at following flow to have an overview of Requests and Responses:
Run node server.js
for a dev server exporting API at http://localhost:8080/.
Run ng serve --port 8081
. Navigate to http://localhost:8081/
.