django-allauth icon indicating copy to clipboard operation
django-allauth copied to clipboard

Support Multiple providers of the same kind

Open yarbelk opened this issue 9 years ago • 10 comments

A very large feature request - Support multiple SocialApps of the same provider.

  • in some places this will help clean up some of the code conceptually - using standard ORM FK instead of lots of helper methods and callbacks.
  • Useful for those people who are running sites with a Facebook Business account and lots of apps (additional strangeness here b/c of unique UIDs). Or are building api services that make use of the same.

If there is interest in this, I'd love to contribute.

yarbelk avatar Jun 30 '15 04:06 yarbelk

I would like this feature as I have a site that would like to offer two companion applications on the same social provider. So if a user signs in or connects to a provider using an app and then signs-in/connects a second app with the same provider it should re-use the same social account (which should be fine because social account has an FK to provider, not app).

To me this all seems possible to implement without the need for model changes or making them swap-able. If I am right the feature would be far smaller in scope but am I missing something?

ivanvenosdel avatar May 10 '18 22:05 ivanvenosdel

@pennersr The reason I ask is because I am trying to decide whether to put in the time to contribute a PR for this now.

If the work is far more involved then what I am thinking or you simply don't want to merge anything related to this feature anytime soon (it is marked "future") then I will likely work around it instead.

As for a work-around I am thinking that creating a custom provider for the second app (that is intended for the same provider) to use should work. Basically the custom provider would be identical to the original but will have a different name. Edit: The problem with this work around is that I think re-using the social account from the original app might get tricky.

ivanvenosdel avatar May 24 '18 15:05 ivanvenosdel

@ivanvenosdel Did you "put in the time" for this feature maybe i could use your fork or something. :) @pennersr I would like this feature as well because as @yarbelk said:

  • Useful for those people who are running sites with a Facebook Business account and lots of apps (additional strangeness here b/c of unique UIDs). Or are building api services that make use of the same. I fall into the former, having a Facebook Business account running multiples apps that use facebook authentication. I am willing to contribute a PR as well.

esabunor avatar Nov 05 '18 10:11 esabunor

@pennersr any progress on this issue?

hishamkaram avatar Feb 19 '19 14:02 hishamkaram

This feature may be an important one as more mobile applications are being developed based on the same webserver. Hence there could be multiple mobile apps that allow users to login through the same provider (eg. facebook) but still want to deliver the service through the same webserver powered by allauth.

Is there a solution available for this already? Or any plans to integrate this feature with django allauth?

skumarcm avatar Jan 24 '21 19:01 skumarcm

Has there been any update on this feature, to have multiple social apps for the same provider

delton-ecometrica avatar Jun 21 '22 08:06 delton-ecometrica

I'm not involved in the project that gave rise to this. I think its a great feature that someone should do, but I won't be the one to do it. Feel free to have someone take over.

yarbelk avatar Jun 24 '22 03:06 yarbelk

Multiple apps for the same provider is one thing, but when talking about self-hosted providers - like Keycloak - having multiple providers isn't a bad idea either...

Or maybe just move the endpoint URL and realm for Keycloak into the config rather than setting it via env variables.

I might have a look at this in a few weeks, when I have some time.

gboor avatar Nov 04 '22 07:11 gboor

Seems valid, @pennersr seems like there are people interested in contributing and need guidance on this one if it's desirable or not.

derek-adair avatar Sep 18 '23 02:09 derek-adair

@pennersr Is there any plans of this being completed? I am looking for this functionality in my application.

Ramon-W avatar Jan 20 '24 21:01 Ramon-W

This is already working for OIDC based providers. So, depending on the providers you need to support this might already just work.

pennersr avatar Jan 22 '24 21:01 pennersr