From the course: Building Angular and ASP.NET Core Applications
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Setting up an authentication service
From the course: Building Angular and ASP.NET Core Applications
Setting up an authentication service
- Now that we've set up the Auth0 account, let us set up the authentication service. But before we do so, let us install the necessary package. So, let's go to Visual Code and see this in action. In here, right click on the ClientApp and then choose the open in Terminal option. To install the package, write npm install @auth0/auth0-spa-js and then use the --save flag. So, the package was installed. Now, let us generate the service which we are going to use to authenticate the users. So, inside the ClientApp, go inside the src folder, and then inside the the app folder, then go inside the services folder, right click, and open it in Terminal. To generate the service we are going to use the Angular CLI, so for that write ng, g which stands for generate, then s for service, and the name of the service is going to be auth service, so, you can just name it auth. Press enter and you will see now that inside the services…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.