Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/auth0-blog/angular2-authentication-sample
This is a sample that shows how to add authentication to an Angular 2 (ng2) app
https://github.com/auth0-blog/angular2-authentication-sample
Last synced: 3 months ago
JSON representation
This is a sample that shows how to add authentication to an Angular 2 (ng2) app
- Host: GitHub
- URL: https://github.com/auth0-blog/angular2-authentication-sample
- Owner: auth0-blog
- License: mit
- Created: 2015-04-28T15:51:03.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-16T19:06:39.000Z (about 7 years ago)
- Last Synced: 2024-05-11T21:37:15.417Z (6 months ago)
- Language: JavaScript
- Size: 283 KB
- Stars: 970
- Watchers: 118
- Forks: 333
- Open Issues: 29
-
Metadata Files:
- Readme: Readme.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - angular2-authentication-sample - blog | 981 | (JavaScript)
README
# Angular 2: Authentication sample.
This sample shows how to create an angular 2 app that:
* Has **lots of different routes**
* Performs **authentication with JWTs**
* **Calls APIs** authenticated and not.
* Extends the **RouterOutlet** for route pipeline changes.You can **learn more about how it works in the following blogposts**
* [Angular 2 Authentication Tutorial](https://auth0.com/blog/angular-2-authentication/)
* [Protecting Routes using Guards in Angular 2](http://blog.thoughtram.io/angular/2016/07/18/guards-in-angular-2.html)
* [Angular 2 authentication revisited](https://medium.com/@blacksonic86/angular-2-authentication-revisited-611bf7373bf9)## Running it
Clone this repository as well as [the server](https://github.com/auth0/nodejs-jwt-authentication-sample) for this example.
First, run the server app in the port `3001`.
Then, run `npm install` on this project and run `npm start` to start the app. Then just navigate to [http://localhost:3000](http://localhost:3000) :boom:
Use `npm run server` to run API server.## Issue Reporting
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues.
## Author
[Auth0](auth0.com)
## License
This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.