Associate one social profile with multiple (django-) users

15 views
Skip to first unread message

andreas...@gmail.com

unread,
Jul 7, 2016, 5:53:00 AM7/7/16
to python-social-auth
Hi all,

for a current project we need the option to associate one social profile (e.g. Facebook account) with multiple (Django-) users.

From a quick glance at the code I assume that it isn't easily doable out of the box as the `UserSocialAuth` model has a FK to the user model (https://github.com/omab/python-social-auth/blob/master/social/apps/django_app/default/models.py#L33).

So the options I see is that we would either have to override the `UserAuthModel` to allow assigning multiple users
or we need to allow the creation multiple UserAuthModels per UID and Provider which is prevented by a unique_together constraint per default (https://github.com/omab/python-social-auth/blob/master/social/apps/django_app/default/models.py#L73).

Both options seem rather hacky and will probably lead to further problems down the road.

Do I miss an easier way to achieve what we want? Or is this a task that's rather out of python-social-auth's standard scope/use case?

Cheers,
Andreas

Reply all
Reply to author
Forward
0 new messages