Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

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 to True
    • 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")
  • 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"
Clone this wiki locally