Angular 2+ Introduction
This multistep quickstart guide will walk you through setting up and managing authentication in your Angular (version 2 and higher) apps using Auth0.
When you signed up for Auth0, you were invited to create a new client.
There are some details about this client that your application needs to know about to properly communicate with Auth0. These include your Client ID, Domain, and Client Secret. You can retrieve these values from the settings area for your client in the Auth0 dashboard.
Please note that if you download the samples available for this tutorial, these keys will be pre-populated for you. If you have created more than one client in your account, the sample will come with the values for your Default App.
Configure Callback URLs
A callback URL is a URL in your application where Auth0 redirects to after the user has authenticated. You can whitelist callback URLs for your app in the Callback URL field in your Client Settings. If no callback URLs are set, a mismatch error will be displayed when a user logs in.
Add the Dependencies
To integrate your Angular 2 application with Auth0, you will need to add the following two dependencies:
Lock Widget is the default authentication widget provided by Auth0.
npm install --save auth0-lock
Or the Auth0 CDN:
npm install --save angular2-jwt