mean-stack-authentication-authorization
mean-stack-authentication-authorization copied to clipboard
MEAN stack Authentication and Authorization example - Registration, Login, Logout with JWT
MEAN stack Authentication and Authorization example
Build MEAN stack JWT Authentication & Authorization example with HttpOnly Cookie and JWT.
Flow for User Registration and User Login
For JWT – Token based Authentication with Rest API, we’re gonna call 2 endpoints:
- POST
api/auth/signupfor User Registration - POST
api/auth/signinfor User Login - POST
api/auth/signoutfor User Logout
You can take a look at following flow to have an overview of Requests and Responses:

For more detail, please visit the tutorial:
Run
Node.js Server
Run node server.js for a dev server exporting API at http://localhost:8080/.
Angular Client
Run ng serve --port 8081. Navigate to http://localhost:8081/.
More practice
Fullstack with Node:
Integration (run back-end & front-end on same server/port)