INSTALLED_APPS = [ 'allauth.socialaccount.providers.github', # new (github provider) ]
Now open https://github.com/settings/applications/new to get configure the OAuth app in GitHub. You will get a client ID and secret key.
Fill up the details and for
Homepage URL: http://localhost:8000/
Authorization callback URL: http://localhost:8000/accounts/github/login/callback/
Then click on Register application
Now log out yourself because you logged in as a superuser and open http://localhost:8000/accounts/login/arrow-up-right and you can see GitHub login option.
If you have customized django-allauth templatesarrow-up-right then you can directly use this code in your template.
Last updated 2 years ago
{% load socialaccount %} <h1>Django Allauth Tutorial</h1> <a href="{% provider_login_url 'github' %}">Sign Up with GitHub</a>