An open API service indexing awesome lists of open source software.

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

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 Logout

You can take a look at following flow to have an overview of Requests and Responses:

![mean-stack-authentication-authorization-flow](mean-stack-authentication-authorization-flow.png)

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/)