Skip to content

This is a demo application that demonstrates how to to do delegated authorization with OAuth 2 using standard .NET libraries.

License

Notifications You must be signed in to change notification settings

NotMyself/delegated-authorization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  2. Change directory into the cloned repository cd bivrost delegated-authorization
  3. Run the command dotnet user-secrets set Auth0:Domain {auth0-tenant-domain}.
  4. Run the command dotnet user-secrets set Auth0:ClientId {auth0-client-id}.
  5. Run the command dotnet user-secrets set Auth0:ClientSecret {auth0-client-secret}.
  6. Run the command dotnet user-secrets set Github:ClientId {github-client-id}.
  7. Run the command dotnet user-secrets set Github:ClientSecret {github-client-secret}.
  8. Run the command dotnet user-secrets set Twitch:ClientId {twitch-client-id}.
  9. Run the command dotnet user-secrets set Twitch:ClientSecret {twitch-client-secret}.
  10. Run the command dotnet restore src/server
  11. 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 (OIDC) https://localhost:5001/callback
Twitch (OAuth) https://localhost:5001/authorize-twitch
Github (OAuth) https://localhost:5001/authorize-github

Demo

Demo

About

This is a demo application that demonstrates how to to do delegated authorization with OAuth 2 using standard .NET libraries.

Topics

Resources

License

Stars

Watchers

Forks

Languages