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

Bug in login with Django 1.6 #53

Closed
mongkok opened this issue Oct 9, 2013 · 5 comments
Closed

Bug in login with Django 1.6 #53

mongkok opened this issue Oct 9, 2013 · 5 comments

Comments

@mongkok
Copy link

mongkok commented Oct 9, 2013

I can't being logged with any social backend with Django 1.6b4.

I have debugged and I realized that the request var (strategy.request) is not the same when accessing to final view ("example.app.views.done") as the strategy.request, which is modified with the real logged user.

PS: The account association seems to work properly

@omab
Copy link
Owner

omab commented Oct 10, 2013

They should be different, done view is reached after a redirect, so the request is completely different. What happens when you reach that view?

@mongkok
Copy link
Author

mongkok commented Oct 10, 2013

In the final request the user (request.user) is Anonymous when it should be the real user instance.

@omab
Copy link
Owner

omab commented Oct 10, 2013

Since this change django/django@dc43fbc Django enforces authentication backends to be defined on AUTHENTICATION_BACKENDS setting, but this app uses a wrapper in order to get access to the Strategy which is unknown to backends and app-dependent, but the wrapper is not defined in AUTHENTICATION_BACKENDS, adding it makes it work again and until some decoupling is done in the project I don't see any other fix, so I'll recommend this setting until I find a better solution.

@omab
Copy link
Owner

omab commented Oct 10, 2013

@omab
Copy link
Owner

omab commented Oct 11, 2013

This change solved that the same day the fix was introduced:

ebaa4b5

Excerpts from Yu Yang's message of 2013-10-11 08:26:46 -0200:

@omab this change breaks normal login. for example when I login in admin page, it gives an AttributeError:

'BackendWrapper' object has no attribute 'authenticate'

Reply to this email directly or view it on GitHub:

#53 (comment)

Matías Aguirre (matiasaguirre@gmail.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

2 participants