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

social.exceptions.AuthStateMissing #244

Closed
phniix opened this issue Apr 11, 2014 · 4 comments
Closed

social.exceptions.AuthStateMissing #244

phniix opened this issue Apr 11, 2014 · 4 comments

Comments

@phniix
Copy link
Contributor

phniix commented Apr 11, 2014

Exception: social.exceptions.AuthStateMissing

This appears to be a duplicate of issue #166
I have followed the guidelines in the above issue but SESSION_PROTECTION was set to basic by default. Have played around with it being basic and strong - results are consistently the following traceback.

Stack Trace:
Traceback (most recent call last):
File ".../lib/python2.7/site-packages/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File ".../lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File ".../lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File ".../lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File ".../lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File ".../lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File ".../lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File ".../lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File ".../lib/python2.7/site-packages/social/apps/flask_app/utils.py", line 37, in wrapper
return func(backend, _args, *_kwargs)
File ".../lib/python2.7/site-packages/social/apps/flask_app/routes.py", line 23, in complete
_args, *_kwargs)
File ".../lib/python2.7/site-packages/social/actions.py", line 44, in do_complete
_args, *_kwargs)
File ".../lib/python2.7/site-packages/social/strategies/base.py", line 67, in complete
return self.backend.auth_complete(_args, *_kwargs)
File ".../lib/python2.7/site-packages/social/backends/facebook.py", line 57, in auth_complete
state = self.validate_state()
File ".../lib/python2.7/site-packages/social/backends/oauth.py", line 305, in validate_state
raise AuthStateMissing(self, 'state')
AuthStateMissing: Session value state missing.

Affected Browser: Chrome version: 33.xx, 34.xx

Chrome Cookie settings
screen shot 2014-04-11 at 8 55 55 pm

Flask-Login==0.2.10
Flask-Principal==0.4.0
Flask-Security==1.7.1
python-social-auth==0.1.22

@phniix
Copy link
Contributor Author

phniix commented Apr 23, 2014

From further investigation with how Google Chrome handles cookies.
Adjusted my local domain name and authorization works without qualms.

Closing.

@phniix phniix closed this as completed Apr 23, 2014
@Uznick
Copy link

Uznick commented Jun 12, 2014

@jjshabs, could you, please, write more details about the solving of the problem? I've having the same issue and have no idea what to do :)

@phniix
Copy link
Contributor Author

phniix commented Jun 23, 2014

This should be a pretty quick fix for you @Uznick
What you want to do is use a legitimate domain and TLD for use inside of Chrome. Don't use the reserved localhost, or a TLD like .dev or .local.
For example, use:
foo.com
don't use:
foo.dev
foo.local
localhost
Make adjustments to your local hosts file and you will see that this works a treat =D

@Uznick
Copy link

Uznick commented Jun 23, 2014

Thanks :)

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

2 participants