https://github.com/notmyself/delegated-authorization
This is a demo application that demonstrates how to to do delegated authorization with OAuth 2 using standard .NET libraries.
https://github.com/notmyself/delegated-authorization
oauth2 oidc openid-connect
Last synced: 19 days ago
JSON representation
This is a demo application that demonstrates how to to do delegated authorization with OAuth 2 using standard .NET libraries.
- Host: GitHub
- URL: https://github.com/notmyself/delegated-authorization
- Owner: NotMyself
- License: mit
- Created: 2020-06-22T21:16:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-22T22:04:13.000Z (about 6 years ago)
- Last Synced: 2025-12-19T20:33:20.436Z (6 months ago)
- Topics: oauth2, oidc, openid-connect
- Language: C#
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Delegated Authorization
**Scenario:** I am building an application with no database.
It will mainly consume 3rd party APIs on behalf of a user.
That user will do authentication using Auth0 through OpenID Connect.
Then the user will authorize Github and Twitch API access via OAuth 2.
## Getting Started
As long as you have the development dependencies installed, the application can be run on your bare metal machine.
1. Clone the repository: `git clone git clone https://github.com/NotMyself/delegated-authorization.git`
1. Change directory into the cloned repository `cd bivrost delegated-authorization`
1. Run the command `dotnet user-secrets set Auth0:Domain {auth0-tenant-domain}`.
1. Run the command `dotnet user-secrets set Auth0:ClientId {auth0-client-id}`.
1. Run the command `dotnet user-secrets set Auth0:ClientSecret {auth0-client-secret}`.
1. Run the command `dotnet user-secrets set Github:ClientId {github-client-id}`.
1. Run the command `dotnet user-secrets set Github:ClientSecret {github-client-secret}`.
1. Run the command `dotnet user-secrets set Twitch:ClientId {twitch-client-id}`.
1. Run the command `dotnet user-secrets set Twitch:ClientSecret {twitch-client-secret}`.
1. Run the command `dotnet restore src/server`
1. Run the command `dotnet watch src/server`
## Obtaining Client Credentials
You will need to create an Auth0 tenant and configure a client application for OIDC authentication. You will also need to create OAuth 2 client credentials for Twitch and Github.
| Service | Callback URI |
|----------------|:-------------:|
| [Auth0](https://auth0.com/) (OIDC) | https://localhost:5001/callback |
| [Twitch](https://dev.twitch.tv/console) (OAuth) |https://localhost:5001/authorize-twitch |
| [Github](https://github.com/settings/developers) (OAuth) |https://localhost:5001/authorize-github |
## Demo
[](http://www.youtube.com/watch?v=Xn5e4-a9QQw "Demo")