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
Facebook auth gives KeyError #37
Comments
That error is thrown due to the forbidden handler which suggests something with Facebook failed, and, the environment that pyramid passes is missing that key. Perhaps that key was removed in Pyramid - I'll take a look at that. The second question is, why did the forbidden handler get called. The two things that typically cause it are an invalid or missing csrf_token which appears to be present. The other possibility is that your beaker session has an improper domain name (isn't localhost) as the callback shouldn't be getting a Forbidden. I'll patch this, but, would like a little more information so I can duplicate the problem and fix it, rather than hiding the error. |
It appears that Pyramid 1.2a3 changed the environment when a Forbidden exception is generated. I suspect the issue you're running into is csrf validation as I just did a clean installation and tested Facebook and I'm not able to generate that message unless I alter the csrf key. When you visit a protected area, the exception still includes the environment variable 'bfg.routes.route', but, is now missing 'repoze.bfg.message'. Temporarily I've pushed a fix, but, I'm not satisfied with the solution. |
I'm still unable to duplicate this and have used Apex for a number of production projects. My guess is that the error received was from a bad CSRF which forced the login again. If you can provide me with a minimal test case/configuration that duplicates the error, I'd be more than happy to figure out what went wrong. I'm going to close it for now as a considerable amount has changed since the ticket was opened, and, it is possible that the issue was fixed along the way as well. |
Hi,
I've tried to set up the example app, simply adding some properly set up facebook api credentials to the config yaml file. But authentication fails (actually, it might happen that authentication was successful, as the resulting view is not shown)
The text was updated successfully, but these errors were encountered: