Closed jleclanche closed 2 years ago
There is a signal emitted when a user connects a new social account, would that help?:
# Sent after a user connects a social account to a their local account.
social_account_added = Signal(providing_args=["request", "sociallogin"])
Yes, I think that helps. However, in a more general sense, it would still be nice to have that whole procedure be part of the provider class -- would it make sense? That way we have more access on overridable behaviour and can do more fine-grained instrumentation. Right now, gotta monkey patch if we want to do that.
Hi pennersr
I had over ride the social account adapter by setting it in social account adapter
SOCIALACCOUNT_ADAPTER = 'xxx.xxx.xxx.xx' - path
i have introduced a new text field or custom field , in adapter function save_user(), how can i get the custom field to get stored in database.
Closing -- using signals+adapter this can be done.
I'm trying to understand the way that
complete_social_login()
works.My use case: I want to add instrumentation to the login, specifically I want to know when users are using the "connect" process.
I already do this on user creation and auth errors, which is easy because of the
new_user()
andauthentication_error()
methods on the social account adapter:https://github.com/HearthSim/HSReplay.net/blob/master/hsreplaynet/accounts/providers.py#L33
But it appears that the connect process doesn't call into a provider method. It calls the internal function
_add_social_account
which seldom calls into the provider at all. Is there a chance this can call back into the provider a bit more? I can help work on that if we agree on a design.