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

User is associated by email even though associate_by_email pipeline is disabled #634

Open
vanya909 opened this issue Nov 28, 2024 · 0 comments

Comments

@vanya909
Copy link

Ways to reproduce

  1. Create django model with USERNAME_FIELD set as email
  2. Create user with some email
  3. Try to log in via social auth under the user with the same email

Expected behaviour

AuthForbidden should be raised, because originally this user was not created via social auth

Actual behaviour

User is being logged in


Looks like if username field for the model is email then user will be logged in by this email even though it may be unsafe as it was mentioned in associate_by_email pipeline's docs

Is this an expected behavior?

image
image

https://github.com/python-social-auth/social-app-django/blob/master/social_django/storage.py#L91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant