4

I looked up for an answer but were not able to find it.

This is my scenario:

  • a django application
  • I'm using python-social-auth to connect to social networks, and Facebook in particular
  • I'm using the default pipeline:

    SOCIAL_AUTH_PIPELINE = [ 'social.pipeline.social_auth.social_details', 'social.pipeline.social_auth.social_uid', 'social.pipeline.social_auth.auth_allowed', 'social.pipeline.social_auth.social_user', 'social.pipeline.user.get_username', 'social.pipeline.user.create_user', 'social.pipeline.social_auth.associate_user', 'social.pipeline.social_auth.load_extra_data', 'social.pipeline.user.user_details', ]

  • in my template I add a link to authenticate with Facebook:

<a class="btn btn-default social facebook" href="{% url "social:begin" "facebook" %}" role="button">

The simple operation of logging (through Facebook) works smoothly. The problem I'm having is this:

If I manage two facebook accounts foo and fie, and currently I'm logged in (in Facebook) as foo, when I try to login (through Facebook) on my application, I don't get the chance to choose to login as fie, but I'm logged in only as foo. I've to disconnect from the Facebook site, and then come back to my application.

Does python-social-auth provide a "native" way to ask (e.g. in a confirmation window) whether the user wants to login in my application as user foo (as he/she is currently logged in Facebook) or as someone else?

Also a snippet available on the web would be good :)

Thanks a lot

FSp
  • 1,545
  • 17
  • 37
  • I don't know how this plugin works but I'd say this is expected, if you are already logged in at Facebook it's OK to assume that you'll want to log into the App using that account (actually, you should have two different Facebook accounts). – Javier de la Cueva Nov 02 '15 at 13:40
  • I agree. Indeed I think something like what I want is implementable adding a view that asks for confirmation to the user, and if he/she wants to change his/her identity, allows to log-off and re-login in facebook, and in my application as well. I was asking because Google OAuth is smart enough to ask you which identity to use when logging in in my application (through python-social-auth, of course), in case I have more than one Google identity, so I didn't want to re-implementing something that was already available. But thanks for your comment – FSp Nov 02 '15 at 13:43

0 Answers0