This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Setting up Github OAuth
nhoehne edited this page Dec 16, 2022
·
1 revision
In order to use the "Login with Github" feature, you need to set up Github OAuth:
- Go to settings.py
- Set
GITHUB_AUTH
toTrue
- Set
GITHUB_AUTH_CALLBACK
to"http://frontendurl/github_confirm"
(if you want to set it up locally, your frontend URL will most likely be "localhost:9000")
- Set
- Go to your Github OAuth Apps and create a new OAuth application by clicking on "New OAuth App"
- Enter the name of your application
- Enter the URL of your homepage
- Enter the authorization callback URL (which should be the same as the value you set
GITHUB_AUTH_CALLBACK
to) - Do not enable "Device Flow"
- Write down the client ID
- Generate a new client secret by clicking the button
- Write down the generated client secret
- Start the backend and navigate to the admin panel at http://backendurl/admin (locally your backend URL will most likely be "localhost:8000")
- Log in
- Navigate to "Social Applications" and click "Add Social Application"
- Select Github as the provider
- Enter the name of your application
- Enter the client ID you wrote down
- Enter the client secret you wrote down under "Secret key"
- You do not need to enter anything under "Key"