Github Social Authentication
Read Context
For reusability, ensure to read the discussion on context so that the environment variables that are secured can be repurposed for testing in other websites later on.
Field | Value |
---|---|
Homepage url | http ://127.0.0.1:8000/ |
Callback url | http ://127.0.0.1:8000/accounts/github/login/callback |
Field | Value |
---|---|
Homepage url | http ://0.0.0.0:8080/ |
Callback url | http ://0.0.0.0:8080/accounts/github/login/callback |
Replace start-django.fly.dev
with the new site.
Field | Value |
---|---|
Homepage url | e.g. https ://start-django.fly.dev |
Callback url | e.g. https ://start-django.fly.dev/accounts/github/login/callback/ |
AllAuth
We need to secure the following values:
Key | Value |
---|---|
GITHUB_ID |
Client id |
GITHUB_KEY |
Client secret |
This is per the configuration we set via django-allauth:
/config/settings/_auth.py | |
---|---|
We secure these keys via the Github Console: OAuth apps
Form
Register:
Field | Value | Description |
---|---|---|
Application name | required | Seen in consent screen |
Application logo | optional | Badge of trust in consent screen |
Homepage URL | site url |
API key / id credential association |
Authorization callback URL | site url /accounts/github/login/callback/ |
Successful login via allauth |
Credentials
- Note Client id.
- Click on generate a Client secret.
- Note warning after secret generated: Make sure to copy your new client secret now. You won’t be able to see it again.
- Save id and secret.