/angular-auth0-aside

Aside: Angular with Auth0 and an authenticated Node API.

Primary LanguageTypeScriptMIT LicenseMIT

angular-auth0-aside

This repository demonstrates the use of Auth0 with Angular (with the @angular/cli) and a sample Node API with a protected route.

Dependencies

Complete Instructions

For complete instructions on how to set up an Auth0 account, client, and API, as well as how to use this project's Node API and Angular application, please see Angular Auth0 Aside.

Installation

Clone this project. From the root directory, run the following commands to install dependencies for the server and client-side:

$ npm install
$ cd server
$ npm install
  1. Open server/config.js.example and remove .example from the file name. Then replace [CLIENT_DOMAIN] with your Auth0 domain.
  2. Open src/app/auth/auth0-variables.ts.example and remove .example from the file name. Then replace [CLIENT_ID] and [CLIENT_DOMAIN] with your Auth0 client ID and domain.

Serving the project

  • Node server: run node server from the /server folder.
  • Angular: run ng serve from the root folder.

What is Auth0?

Auth0 helps you to:

  • Add authentication with multiple authentication sources, either social like Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce, amont others, or enterprise identity systems like Windows Azure AD, Google Apps, Active Directory, ADFS or any SAML Identity Provider.
  • Add authentication through more traditional username/password databases.
  • Add support for linking different user accounts with the same user.
  • Support for generating signed Json Web Tokens to call your APIs and flow the user identity securely.
  • Analytics of how, when and where users are logging in.
  • Pull data from other sources and add it to the user profile, through JavaScript rules.

Create a Free Auth0 Account

  1. Go to Auth0 and click Sign Up.
  2. Use Google, GitHub, or Microsoft Account to log in.

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 details the procedure for disclosing security issues.

Author

Auth0

License

This project is licensed under the MIT license. See the LICENSE file for more info.