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.
As long as you have the development dependencies installed, the application can be run on your bare metal machine.
- Clone the repository:
git clone git clone https://github.com/NotMyself/delegated-authorization.git
- Change directory into the cloned repository
cd bivrost delegated-authorization
- Run the command
dotnet user-secrets set Auth0:Domain {auth0-tenant-domain}
. - Run the command
dotnet user-secrets set Auth0:ClientId {auth0-client-id}
. - Run the command
dotnet user-secrets set Auth0:ClientSecret {auth0-client-secret}
. - Run the command
dotnet user-secrets set Github:ClientId {github-client-id}
. - Run the command
dotnet user-secrets set Github:ClientSecret {github-client-secret}
. - Run the command
dotnet user-secrets set Twitch:ClientId {twitch-client-id}
. - Run the command
dotnet user-secrets set Twitch:ClientSecret {twitch-client-secret}
. - Run the command
dotnet restore src/server
- Run the command
dotnet watch src/server
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 |