https://github.com/bezkoder/mean-stack-authentication-authorization
MEAN stack Authentication and Authorization example - Registration, Login, Logout with JWT
https://github.com/bezkoder/mean-stack-authentication-authorization
angular angular13 authentication authorization express expressjs jwt jwt-auth jwt-authentication jwt-token mean-stack meanstack mongodb mongoose node-js nodejs
Last synced: 6 days ago
JSON representation
MEAN stack Authentication and Authorization example - Registration, Login, Logout with JWT
- Host: GitHub
- URL: https://github.com/bezkoder/mean-stack-authentication-authorization
- Owner: bezkoder
- Created: 2022-06-07T03:24:08.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-02-04T09:33:30.000Z (about 1 year ago)
- Last Synced: 2025-03-28T10:47:33.513Z (24 days ago)
- Topics: angular, angular13, authentication, authorization, express, expressjs, jwt, jwt-auth, jwt-authentication, jwt-token, mean-stack, meanstack, mongodb, mongoose, node-js, nodejs
- Language: TypeScript
- Homepage:
- Size: 606 KB
- Stars: 34
- Watchers: 3
- Forks: 23
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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/signup` for User Registration
- POST `api/auth/signin` for User Login
- POST `api/auth/signout` for User LogoutYou can take a look at following flow to have an overview of Requests and Responses:

For more detail, please visit the tutorial:
> [MEAN stack Authentication & Authorization with Angular 13](https://www.bezkoder.com/mean-stack-auth-angular-13/)> [MEAN stack Authentication & Authorization with Angular 14](https://www.bezkoder.com/mean-stack-auth-angular-14/)
> [MEAN stack Authentication & Authorization with Angular 15](https://www.bezkoder.com/mean-stack-auth-angular-15/)
> [MEAN stack Authentication & Authorization with Angular 16](https://www.bezkoder.com/mean-stack-auth-angular-16/)
> [MEAN stack Authentication & Authorization with Angular 17](https://www.bezkoder.com/mean-stack-auth-angular-17/)
## 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:
> [Angular 13 + Node Express + MongoDB example](https://www.bezkoder.com/mean-stack-crud-example-angular-13/)
> [Angular 14 + Node Express + MongoDB example](https://www.bezkoder.com/mean-stack-crud-example-angular-14/)
> [Angular 15 + Node Express + MongoDB example](https://www.bezkoder.com/angular-15-node-js-express-mongodb/)
> [Angular 16 + Node Express + MongoDB example](https://www.bezkoder.com/angular-16-node-js-express-mongodb/)
> [Angular 17 + Node Express + MongoDB example](https://www.bezkoder.com/angular-17-node-js-express-mongodb/)
> [Angular 13 + Node Express: File upload example](https://www.bezkoder.com/angular-13-node-express-file-upload/)
> [Angular 14 + Node Express: File upload example](https://www.bezkoder.com/angular-14-node-express-file-upload/)
> [Angular 15 + Node Express: File upload example](https://www.bezkoder.com/angular-15-node-express-file-upload/)
> [Angular 16 + Node Express: File upload example](https://www.bezkoder.com/angular-16-node-express-file-upload/)
> [Angular 17 + Node Express: File upload example](https://www.bezkoder.com/angular-17-node-express-file-upload/)
Integration (run back-end & front-end on same server/port)
> [How to integrate Angular with Node Restful Services](https://www.bezkoder.com/integrate-angular-12-node-js/)