Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 Client Error: Not Found for url: https://github.com/login/oauth/access_token #110

Open
Hugo-Persson opened this issue Nov 19, 2023 · 3 comments

Comments

@Hugo-Persson
Copy link

I get the following error when trying to log in with Github

Environment:


Request Method: GET
Request URL: https://tabby.evercode.se/api/1/auth/social/complete/github/?code=7e0998d8142b72e790fd&state=2zCOu89YvhD129qYt7L9fbrGT7IaP5XL

Django Version: 3.2.12
Python Version: 3.7.17
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'rest_framework',
 'social_django',
 'corsheaders',
 'tabby.app']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'corsheaders.middleware.CorsMiddleware',
 'tabby.middleware.TokenMiddleware',
 'tabby.middleware.GAMiddleware']



Traceback (most recent call last):
  File "/venv/tabby-web-9TtSrW0h-py3.7/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/venv/tabby-web-9TtSrW0h-py3.7/lib/python3.7/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/venv/tabby-web-9TtSrW0h-py3.7/lib/python3.7/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/venv/tabby-web-9TtSrW0h-py3.7/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/venv/tabby-web-9TtSrW0h-py3.7/lib/python3.7/site-packages/social_django/utils.py", line 49, in wrapper
    return func(request, backend, *args, **kwargs)
  File "/venv/tabby-web-9TtSrW0h-py3.7/lib/python3.7/site-packages/social_django/views.py", line 33, in complete
    *args, **kwargs)
  File "/venv/tabby-web-9TtSrW0h-py3.7/lib/python3.7/site-packages/social_core/actions.py", line 45, in do_complete
    user = backend.complete(user=user, *args, **kwargs)
  File "/venv/tabby-web-9TtSrW0h-py3.7/lib/python3.7/site-packages/social_core/backends/base.py", line 40, in complete
    return self.auth_complete(*args, **kwargs)
  File "/venv/tabby-web-9TtSrW0h-py3.7/lib/python3.7/site-packages/social_core/utils.py", line 248, in wrapper
    return func(*args, **kwargs)
  File "/venv/tabby-web-9TtSrW0h-py3.7/lib/python3.7/site-packages/social_core/backends/oauth.py", line 388, in auth_complete
    method=self.ACCESS_TOKEN_METHOD
  File "/venv/tabby-web-9TtSrW0h-py3.7/lib/python3.7/site-packages/social_core/backends/oauth.py", line 360, in request_access_token
    return self.get_json(*args, **kwargs)
  File "/venv/tabby-web-9TtSrW0h-py3.7/lib/python3.7/site-packages/social_core/backends/base.py", line 242, in get_json
    return self.request(url, *args, **kwargs).json()
  File "/venv/tabby-web-9TtSrW0h-py3.7/lib/python3.7/site-packages/social_core/backends/base.py", line 238, in request
    response.raise_for_status()
  File "/venv/tabby-web-9TtSrW0h-py3.7/lib/python3.7/site-packages/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)

Exception Type: HTTPError at /api/1/auth/social/complete/github/
Exception Value: 404 Client Error: Not Found for url: https://github.com/login/oauth/access_token

Do you have any tips on how to solve? What am I doing wrong?

@ysuolmai
Copy link

same error.

@chenzhiguo
Copy link

Any body deploy success?

@Legot
Copy link

Legot commented Dec 23, 2023

In your github app what do you have your callback URL set to? With the way that this app is built it should just be:
http://tabbyhostname.mydomain.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants