GitHub OAuth
GitHub OAuth supports both the web application flow and the device flow. Use a GitHub App (not a legacy OAuth App) so you can configure multiple redirect URIs for test and production. See GitHub: Migrating OAuth Apps to GitHub Apps.
Register a GitHub App
- Go to GitHub Developer Settings and create a new GitHub App.
- Set GitHub App name, Homepage URL, Description, and Callback URL.

info
In the GitHub App, Callback URL must be Casdoor’s callback URL. In Casdoor, the application Redirect URL is your app’s callback URL. See Application config.
- After creating the app, generate the Client secret (under the app settings).

Add the provider in Casdoor
Create an OAuth provider, set Type to GitHub, and enter the Client ID and Client Secret from the GitHub App.

