0

What is the most appropriate Django package for linking regular Django user to FB account? Scenario:

  1. User of regular Django site registers an account
  2. He logs in using plain login/password
  3. He connects his regular account to FB account and able to re-link later it to different FB account if needed.

I can't seem to find a package that matches all of the requirements, seems that most packages(django-facebook, django-social-auth) assume that initial login/registration to site is done through social media, while all I want is - regular django login and some optional/delayed access to social media.

AlexA
  • 4,028
  • 8
  • 51
  • 84

1 Answers1

5

django-social-auth should let you do what you want, since it allows multiple social accounts (e.g. Facebook, LinkedIn, etc...) to be associated with a single Django user (the core auth.User, not a custom user class like some other apps use).

I would look at django-social-auth's pipeline feature and use the social_auth.backends.pipeline.social.associate_user function to associate a Facebook account to an existing User.

dshap
  • 1,382
  • 14
  • 19
  • is there an update to this answer or an article that explains how to this in more depth? Also the link is broken. – Abel Moremi Aug 27 '21 at 12:29