How can I return the real user after django social-auth-app-django?
In my django project I am using django social-auth-app-django for google login to website.Everything is fine,but When user wants to login with google,if user has registired website before,I want to return this user.So ı don't want to create new user.Hox can I do that.I guess ı have to use SOCIAL_AUTH_PIPELINE but I don't know exactly this is works.Can anyone help me for that??
Check if user already has a socialaccount from google, if so login, if not create new account.
from allauth.socialaccount.models import SocialAccount
social_account = SocialAccount.objects.get(provider="google", uid=uid) #uid is from user
registered_user = social_account.user