# Using Auth0 for C# WebAPI, Angular and WPF apps

**URL:** <https://community.auth0.com/t/using-auth0-for-c-webapi-angular-and-wpf-apps/7846>\
**Category:** Get Help\
**Tags:** wpf, c, webapi, angular\
**Created:** [August 15, 2017, 4:27am UTC](https://community.auth0.com/t/using-auth0-for-c-webapi-angular-and-wpf-apps/7846 "2017-08-15T04:27:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![russ](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@russ](https://community.auth0.com/u/russ)\
**Post date:** [August 15, 2017, 4:27am UTC](https://community.auth0.com/t/using-auth0-for-c-webapi-angular-and-wpf-apps/7846/1 "2017-08-15T04:27:43Z")

</div>

We currently have a backend C# WebAPI that uses [ASP.NET](http://ASP.NET) Identity to a SQL database with \<10 users currently (would not look at migrating users, but starting afresh).  
There is a Angular website that users log in via the WebAPI through username\password and oauth bearer tokens. There is also a WPF app that accesses the WebAPI through the same mechanism.  
We are looking at the possibility of moving to Auth0, but we are unsure of the direction to go with all of the options available to us. Would love some guidance on which road to go down 🙂

---

<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:** [August 18, 2017, 6:40pm UTC](https://community.auth0.com/t/using-auth0-for-c-webapi-angular-and-wpf-apps/7846/2 "2017-08-18T18:40:54Z")

</div>

For your scenario the recommended Auth0 configuration would be:

- Represent the Web API as a resource server/API by registering it in the APIs section of the Dashboard.
- Represent the Angular application as a client application with a client type of _Single Page Application_; check Clients section of the Dashboard.
- Represent the WPF application as client application with a client type of _Native_; check Clients section of the Dashboard.

For the user themselves if you’re looking to have custom username/password credentials as the method of authentication then you should create a database connection and associate with both of the client application you created.

Having done the configuration at the Auth0 dashboard it comes time to do the actual integration, for this part you should follow reference documentation and quickstarts:

- Web API
  - [ASP.NET Web API (OWIN)](https://auth0.com/docs/quickstart/backend/webapi-owin) or [ASP.NET Core Web API](https://auth0.com/docs/quickstart/backend/aspnet-core-webapi) quickstarts depending on which flavor of Web API you’re in.

- Angular Client Application
  - [Angular.js](https://auth0.com/docs/quickstart/spa/angularjs) or [Angular](https://auth0.com/docs/quickstart/spa/angular2) quickstart; again depending on the flavor of Angular.
  - Also check the reference documentation on how to [Call APIs from Client-side Web Apps](https://auth0.com/docs/api-auth/grant/implicit)

- WPF Client Application
  - [WPF / Winforms](https://auth0.com/docs/quickstart/native/wpf-winforms) quickstart

---

<div class="post-metadata">

**Author:** ![russ](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@russ](https://community.auth0.com/u/russ)\
**Post date:** [August 22, 2017, 3:07pm UTC](https://community.auth0.com/t/using-auth0-for-c-webapi-angular-and-wpf-apps/7846/3 "2017-08-22T15:07:35Z")

</div>

HI @Jmangelo,

A big thanks for all of that information. I’ve followed through most of it and managed to get it all working nicely now.

Cheers,  
Russ

---

<div class="post-metadata">

**Author:** ![russ](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@russ](https://community.auth0.com/u/russ)\
**Post date:** [August 22, 2017, 3:07pm UTC](https://community.auth0.com/t/using-auth0-for-c-webapi-angular-and-wpf-apps/7846/4 "2017-08-22T15:07:35Z")

</div>

HI @Jmangelo,

A big thanks for all of that information. I’ve followed through most of it and managed to get it all working nicely now.

Cheers,  
Russ

---

<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:55am UTC](https://community.auth0.com/t/using-auth0-for-c-webapi-angular-and-wpf-apps/7846/5 "2018-03-02T05:55:55Z")

</div>


