Skip to content

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

@vanya909

Description

@vanya909

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions