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

AuthStateForbidden error when changing settings #11

Open
mehmetyildi opened this issue Dec 12, 2018 · 5 comments
Open

AuthStateForbidden error when changing settings #11

mehmetyildi opened this issue Dec 12, 2018 · 5 comments
Assignees
Labels
bug!! Something isn't working development phase help wanted Extra attention is needed question Further information is requested

Comments

@mehmetyildi
Copy link
Owner

The instructor got this error, after she registered and trying to change the settings.
She has user instance on the database but has no market settings which may mean she tried to change the settings that she has not created but this error does not make sense on that approach.
I could not reproduce the error myself. Still trying to figure out.

@mehmetyildi mehmetyildi added bug!! Something isn't working help wanted Extra attention is needed question Further information is requested development phase labels Dec 12, 2018
@mehmetyildi mehmetyildi added this to the Test and Deply milestone Dec 12, 2018
@mehmetyildi mehmetyildi self-assigned this Dec 12, 2018
@mehmetyildi
Copy link
Owner Author

This is the error:

Environment:

Request Method: GET
Request URL: http://mehmetyildirim.pythonanywhere.com/oauth/complete/twitter/?redirect_state=wStI895jOWO4SEaedqgacd7SbQIYBFHD&oauth_token=Pxd6CQAAAAAA81L4AAABZ57z8SQ&oauth_verifier=EiT8aSmzyzrosU2ZlHPE61BuMfwo2Ins

Django Version: 2.1.3
Python Version: 3.6.6
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'filter',
'social_django',
'tweets',
'bootstrap_modal_forms',
'rest_framework']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'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',
'social_django.middleware.SocialAuthExceptionMiddleware']

Traceback:

File "/home/mehmetyildirim/.virtualenvs/mysite-virtualenv/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)

File "/home/mehmetyildirim/.virtualenvs/mysite-virtualenv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
126. response = self.process_exception_by_middleware(e, request)

File "/home/mehmetyildirim/.virtualenvs/mysite-virtualenv/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
124. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/home/mehmetyildirim/.virtualenvs/mysite-virtualenv/lib/python3.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, **kwargs)

File "/home/mehmetyildirim/.virtualenvs/mysite-virtualenv/lib/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
54. return view_func(*args, **kwargs)

File "/home/mehmetyildirim/.virtualenvs/mysite-virtualenv/lib/python3.6/site-packages/social_django/utils.py" in wrapper
49. return func(request, backend, *args, **kwargs)

File "/home/mehmetyildirim/.virtualenvs/mysite-virtualenv/lib/python3.6/site-packages/social_django/views.py" in complete
33. *args, **kwargs)

File "/home/mehmetyildirim/.virtualenvs/mysite-virtualenv/lib/python3.6/site-packages/social_core/actions.py" in do_complete
43. user = backend.complete(user=user, *args, **kwargs)

File "/home/mehmetyildirim/.virtualenvs/mysite-virtualenv/lib/python3.6/site-packages/social_core/backends/base.py" in complete
40. return self.auth_complete(*args, **kwargs)

File "/home/mehmetyildirim/.virtualenvs/mysite-virtualenv/lib/python3.6/site-packages/social_core/utils.py" in wrapper
259. return func(*args, **kwargs)

File "/home/mehmetyildirim/.virtualenvs/mysite-virtualenv/lib/python3.6/site-packages/social_core/backends/oauth.py" in auth_complete
181. self.validate_state()

File "/home/mehmetyildirim/.virtualenvs/mysite-virtualenv/lib/python3.6/site-packages/social_core/backends/oauth.py" in validate_state
92. raise AuthStateForbidden(self)

Exception Type: AuthStateForbidden at /oauth/complete/twitter/
Exception Value: Wrong state parameter given.

@mehmetyildi
Copy link
Owner Author

Found this:
python-social-auth/social-core#250

@adsk2050
Copy link

adsk2050 commented Dec 2, 2020

Hi @mehmetyildi ! Have you been able to solve this problem? I am facing the same problem with my wagtail - django website. Would love to know your insights

@mehmetyildi
Copy link
Owner Author

Hi @adsk2050. I would like to help out but this was a school project two years ago and as I recall the instructor hit the bug but I couldn't reproduce it. I haven't been using Django since that project. I tried to figure out the problem again but I couldn't manage because I didn't remember Django framework. But the link above can be useful.
Sorry about that. I hope you find the answer.

@adsk2050
Copy link

adsk2050 commented Dec 6, 2020

Thanks a lot for your response. I will let you know if I find out about the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug!! Something isn't working development phase help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants