Angular 2 Introduction

This multistep quickstart guide will walk you through setting up and managing authentication in your Angular 2 apps using Auth0.

Create an Application

Get your credentials (Domain, Client ID, and Client Secret) from the dashboard. The sample is pre-configured with your Default App credentials.

App Dashboard

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 Application 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.

    From npm:

    npm install --save auth0-lock

    Or the Auth0 CDN:

    <script src="https://cdn.auth0.com/js/lock/10.6/lock.min.js"></script>

  • angular2-jwt is a helper library for working with JWTs in your Angular 2 applications.

    From npm:

    npm install --save angular2-jwt

Next Tutorial
2. Login
Use Auth0 for FREECreate free Account