unseen1980 / Angular2-Auth0

Auth0 authentication service in Angular2 + Nodejs + Express

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repository is using a very old version of Angular! It was build in 2016, so the technology has evolved considerably since then. Consider exploring projects that use newer versions of Angular.

Example of Auth0 authentication service in Angular2 + Nodejs + Express.

  1. Backend: NodeJS, express, express-jwt
  2. Frontend: Angular2, Typescript, Bootstrap

Instalation

  1. Clone repository
  2. Run npm install
  3. Register in auth0.com
  4. Create an app and a few test users
  5. In app->settings add http://localhost:3001 in Allowed Callback URLs, Allowed Logout URLs, Allowed Origins (CORS)
  6. Edit variable authenticate in server/app.js with your keys
  7. Edit variable lock in client/src/app.ts with your keys
  8. Run gulp play
  9. Visit http://www.localhost:3001
  10. Check console in developer tools for responses
  11. Enjoy!

Todo

  1. Add livereload
  2. Split app.ts in separate files

Credits

  1. Todd Motto, https://toddmotto.com/angular-2-authentication
  2. Auth0 blog, https://auth0.com/docs/quickstart/spa/angular2/no-api
  3. Ionic blog, http://blog.ionic.io/ionic-2-and-auth0/

License

The content of this project is licensed under the MIT license.

About

Auth0 authentication service in Angular2 + Nodejs + Express


Languages

Language:TypeScript 51.9%Language:JavaScript 29.1%Language:HTML 19.0%