-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
AuthStateMissing
and HTTPError
being raised
#220
Comments
I think we figured it out. it seems to be an issue with the redirect URL from Google OAuth. I will post a more complete explanation when we get a fix. |
@adamsc I think we're running into the same issue. I've registered about 600 users, and it seems like roughly one in 50 will get an AuthStateMissing bug. I think it has something to do with Django sessions not properly storing the 'google-oauth2_state' key. Do you have any updates on how you solved it? |
@goldsmith For us, it turned out to be an issue with the redirect URI we registered with google, rather than any actual bugs with the auth state. At the time, we weren't supporting HTTPS but didn't have it disabled. When someone would attempt to use the site via HTTPS, they would get an error that looked like this: I still haven't had a chance to look into why, but that was getting raised as AuthStateMissing. It was hard to track down because nothing in the logs suggested this sort of configuration issue. We only figured it out after a user emailed us that screenshot. If there's any other information I can provide to help you debug, please let me know. |
Can some one provide the more information on this issue? We are running into same issue, but its happening rarely and not able to figure out the pattern. |
I'm running into the same problem using uwsgi and nginx with django==1.5. The bug only occurs about one in every 5 times someone tries to log in. It won't happen on my development machine using runserver but it does happen on live. I've tried varying DEBUG and http/https, as well as removing all my custom middleware and context processors. |
Hi! I still have this issue with Django. It happens in production, only after running for a while. Last time it occured, I tried to log in with several browsers but that was unsuccessful. As @jpatel3 and @chriscauley said it's pretty random and I didn't found the pattern yet. |
+1 on this seeing the same problem in production. Did anyone get any closer on figuring it out? |
I'm getting this whenever the user hits /complete/provider/ twice (to me, happens often with Linkedin). I'm guessing - not sure - that what happens is this:
If this is indeed the issue, maybe we can somehow avoid popping the session state; rather leaving it as is for the next request. |
Any luck? Any solution or at least cause on why it happens? Its tough to actively reproduce this issue, it happens randomly. Tried to check with different browser and different machines, but not any consistent pattern. (For us it happens on google signin) |
I've been using this library with Django to authenticate with Google OAuth2 successfully for a while now (~200 users registered with no reported problems). However, today a user reported they were unable to register.
Checking the logs shows an
AuthStateMissing: Session value state missing
was initially raised. However, it looks like they tried again and the error wasHTTPError: 500 Server Error: Internal Server Error
coming frombackends/base.py
. Later, there were several moreAuthStateMissing
exceptions raised, but no furtherHTTPError
s. I have included the full logs below.I have been unable to reproduce the error, and as far as I know, no other users are having the same problem. The user reports having cleared their cache and trying another browser with no change. Looking at the code seems to suggest that the
HTTPError
might be just a temporary service issue with Google. I saw issue #166 also involved aAuthStateMissing: Session value state missing
, however, the issue seems different since the majority of users seem to have no difficulty with authentication.Any idea what might be going on? any suggestions would be really appreciated.
Full logs:
The text was updated successfully, but these errors were encountered: