social login added, but can't connect new login to existing users
after lots of research in this list, we managed to add a keycloak login to mailman3.
MAILMAN_WEB_SOCIAL_AUTH = ["allauth.socialaccount.providers.keycloak"] # OIDC_CREATE_USER = False SOCIALACCOUNT_PROVIDERS = { 'keycloak': { 'KEYCLOAK_URL': 'https://keycloak.my.domain', 'KEYCLOAK_REALM': 'nct' # 'SCOPE': ['profile', 'email', 'preferred_username'], } }
and some entries in https://mailman.my.domain/admin/socialaccount/socialapp
This works perfectly for non-existing users/emails. They are created and they are able to subscribe to lists. But, when a user already exists, this does not work; the user gets a password reset email like "...an account using that email address already exists. In case you have forgotten about this, please use the password forgotten procedure to recover your account:..." Which kind of setting/tweak is needed to associate social login accounts to existing mail addresses?
On 9/5/23 14:39, Jörg Schulz wrote:
Which kind of setting/tweak is needed to associate social login accounts to existing mail addresses?
Existing users will need to add social logins to their accounts by going to Top right menu -> Account -> Account Connections
Usually at <domain>/accounts/social/connections/
After adding the new social account, they will be able to login using that.
-- thanks, Abhilash Raj (maxking)
so, no automatic connection possible? Hmmmm, I'd have liked to automagically migrate my users when they decide to use social instead of direct login.
Am 5. September 2023 um 11:17 schrieb "Abhilash Raj" <maxking@asynchronous.in>:
On 9/5/23 14:39, Jörg Schulz wrote:
Which kind of setting/tweak is needed to associate social login accounts to existing mail addresses?
Existing users will need to add social logins to their accounts by going to Top right menu -> Account -> Account Connections
Usually at <domain>/accounts/social/connections/
After adding the new social account, they will be able to login using that.
-- thanks, Abhilash Raj (maxking)
On 9/5/23 15:28, info@joergschulz.de wrote:
so, no automatic connection possible? Hmmmm, I'd have liked to automagically migrate my users when they decide to use social instead of direct login.
No, it currently automatically add a social connection. But there is a similar open issue on the auth library we use: https://github.com/pennersr/django-allauth/issues/3397
Abhilash
-- thanks, Abhilash Raj (maxking)
This will be covered upstream: https://github.com/pennersr/django-allauth/commit/ab704687f438c06fd23e72bce2... .
With "EMAIL_AUTHENTICATION_AUTO_CONNECT" set to True, it might happen that social media users who already have an account will be linked to their existing account. To be reviewed and tested .....
Am 05.09.23 um 14:03 schrieb Abhilash Raj:
On 9/5/23 15:28, info@joergschulz.de wrote:
so, no automatic connection possible? Hmmmm, I'd have liked to automagically migrate my users when they decide to use social instead of direct login.
No, it currently automatically add a social connection. But there is a similar open issue on the auth library we use: https://github.com/pennersr/django-allauth/issues/3397
Abhilash
participants (4)
-
Abhilash Raj
-
info@joergschulz.de
-
J.Schulz
-
Jörg Schulz