https://github.com/ealsur/auth0swagger
Swagger documented API and Autorest generated client with Auth0
https://github.com/ealsur/auth0swagger
asp-net-core auth0 authorization autorest swagger web-api
Last synced: about 1 month ago
JSON representation
Swagger documented API and Autorest generated client with Auth0
- Host: GitHub
- URL: https://github.com/ealsur/auth0swagger
- Owner: ealsur
- License: apache-2.0
- Created: 2016-08-11T02:48:18.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-27T19:55:35.000Z (about 8 years ago)
- Last Synced: 2025-03-18T11:24:23.042Z (about 1 month ago)
- Topics: asp-net-core, auth0, authorization, autorest, swagger, web-api
- Language: C#
- Homepage:
- Size: 57.6 KB
- Stars: 22
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Auth0 enabled Web App and API with Swagger
This repository consists of two Web applications, both using [Auth0](https://auth0.com) to identify users.
The [Web API](./swaggerapi) is built on ASP.NET Core using [Swagger](http://swagger.io) to document its methods and models and provide an easier way to try it with a clear UI.

The [Web App](./swaggerweb) also built on ASP.NET Core is using [Autorest](https://github.com/Azure/autorest) to auto-generate a client based on the Web API Swagger documentation.
Both applications have a configuration file that you will need to fill with your [Auth0 Account details
](https://manage.auth0.com/).In the [Web API appsettings.json](./swaggerapi/appsettings.json), you need to fill your Auth0 domain and client id.
{
"Auth0": {
"Domain": "{YOUR_AUTH0_DOMAIN}",
"ClientId": "{YOUR_AUTH0_CLIENTID}"
}
}> Note: You can use `appsettings.Development.json` and `appsettings.Production.json` to store your configuration data. Make sure to configure `.gitignore` to not include them in your repository though
In the [Web App appsettings.json](./swaggerweb/appsettings.json), you need to fill some extra values plus the CallbackUrl, which should be equal to your Web App running domain.
{
"Auth0": {
"Domain": "{YOUR_AUTH0_DOMAIN}",
"ClientId": "{YOUR_AUTH0_CLIENTID}",
"ClientSecret": "{YOUR_AUTH0_CLIENTSECRET}",
"CallbackUrl": "http://localhost:5001/signin-auth0"
}
}## Full Article
The article describing this repository and step-by-step guide can be found at [Auth0's blog](https://auth0.com/blog/aspnet-core-apis-with-swagger-and-autorest/).