Friday, 29 July 2022

AuthCanceled at /oauth/complete/github/ (Authentication process canceled)

I'm working with a Django app and when I try to login with Github, this error occurs:

AuthCanceled at /oauth/complete/github/

Authentication process canceled

Request Method:     GET
Request URL:    https://my-site.com/oauth/complete/github/?code=xxxxxxxxxxxxxx&state=xxxxxxxxxxxxxx
Django Version:     3.0.5
Exception Type:     AuthCanceled
Exception Value:    Authentication process canceled

Exception Location: /usr/local/lib/python3.7/site-packages/social_core/utils.py in wrapper, line 254
Python Executable:  /usr/local/bin/python
Python Version:     3.7.2
Python Path:        ['/code',
                     '/usr/local/bin',
                     '/usr/local/lib/python37.zip',
                     '/usr/local/lib/python3.7',
                     '/usr/local/lib/python3.7/lib-dynload',
                     '/usr/local/lib/python3.7/site-packages']

I have set (correctly, I think) SOCIAL_AUTH_GITHUB_KEY and SOCIAL_AUTH_GITHUB_SECRET on my settings.py (adding https://my-site.com/oauth/ as Authorization callback URL on https://github.com/settings/applications/XXXXX).

Any idea of where is the problem?


EDIT:

I used /oauth/complete/github because previously I had had this error:

Using the URLconf defined in my-site.urls, Django tried these URL patterns, in this order: 
1. home/ 
2. login/ [name='login'] 
3. logout/ [name='logout'] 
4. oauth/
...


from AuthCanceled at /oauth/complete/github/ (Authentication process canceled)

No comments:

Post a Comment