# How do I use Auth0 for logging into my Application?

**URL:** <https://community.auth0.com/t/how-do-i-use-auth0-for-logging-into-my-application/8113>\
**Category:** Get Help\
**Tags:** .net, angular, auth0\
**Created:** [September 7, 2017, 4:28am UTC](https://community.auth0.com/t/how-do-i-use-auth0-for-logging-into-my-application/8113 "2017-09-07T04:28:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gsctca](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@gsctca](https://community.auth0.com/u/gsctca)\
**Post date:** [September 7, 2017, 4:28am UTC](https://community.auth0.com/t/how-do-i-use-auth0-for-logging-into-my-application/8113/1 "2017-09-07T04:28:54Z")

</div>

I am new to Auth0, and this may seem like a bad question but I am having trouble figuring out how to use Auth0 to log into an application that I am creating for a client. My App is a .NET Web API application that uses Angular JS on the front end. I want to use my Web API to handle the authentication, but I am experience problems. I watched a course on pluralsight about using Auth0 and the other technologies but it seems outdated. Ive also taken a look at the docs for using Auth0 and [ASP.NET](http://ASP.NET) Web API (Owin) but they have further confused me. The goal that I want to reach is sending a username, and password to the Auth0 server and recieving an access\_token and an id\_token that my application will recognize. Can someone point me somewhere or explain to me exactly how I can do this?

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [September 7, 2017, 7:32pm UTC](https://community.auth0.com/t/how-do-i-use-auth0-for-logging-into-my-application/8113/2 "2017-09-07T19:32:09Z")

</div>

Here are the high-level steps to achieve what you described:

1. Create and configure the AngularJS front-end as a client application in the _Clients_ section of the Dashboard; set it’s client type to SPA.
2. Create and configure the .NET Web API as an API in the _APIs_ section of the Dashboard.
3. Integrate Auth0 into the API by following the available [quickstart](https://auth0.com/docs/quickstart/backend/webapi-owin); you mention OWIN so I’m referring to that one. This step is all about setting the API in such way that will authorize requests by validating an access token that was issued through your Auth0 tenant.
4. Integrate Auth0 into the client application by using Auth0.js; you can follow the available [quickstart](https://auth0.com/docs/quickstart/spa/angular2/01-login) (I’m assuming Angular latest).

Having done the above and configured the client application to perform an API authorization (aka passing the appropriate value in the `audience` parameter) request then the client application will be able to obtain an access token suitable to call the API. By default that access token will include the user identifier so that the API is able to know the end-user associated with the call. If you need additional information, you can consider using [custom claims](https://auth0.com/docs/api-auth/tutorials/adoption/scope-custom-claims).

---

<div class="post-metadata">

**Author:** ![gsctca](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@gsctca](https://community.auth0.com/u/gsctca)\
**Post date:** [September 7, 2017, 8:05pm UTC](https://community.auth0.com/t/how-do-i-use-auth0-for-logging-into-my-application/8113/3 "2017-09-07T20:05:20Z")

</div>

Thank you for the answer. One last thing, I currently do not want to use the Hosted login page for logging into my application. What API endpoint do I call with my username and password so that I can recieve a access\_token, and id\_token from my response?

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [September 7, 2017, 8:35pm UTC](https://community.auth0.com/t/how-do-i-use-auth0-for-logging-into-my-application/8113/4 "2017-09-07T20:35:53Z")

</div>

The recommendation is the hosted login page, but if you configure your client to make use of the appropriate grant types then you can consider calling Auth0.js `client.login` [method](https://auth0.com/docs/libraries/auth0js/v8#webauth-client-login-) to achieve that.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:56am UTC](https://community.auth0.com/t/how-do-i-use-auth0-for-logging-into-my-application/8113/5 "2018-03-02T05:56:22Z")

</div>


