4

I have a Django app with a standard django.contrib.auth backend and have a lot of existing users, now I want to add login via Google account using Python Social Auth. Is there any way to allow login via Google account for existing users? How should I associate it with existing users?

Is it okey to set up 'social_core.pipeline.social_auth.associate_by_email' ?

So when user try to log in using Google account and already have an account (created using standard registration with password) in my app then will be automatically logged in. I don't want to allow creating new accounts using Python Social Auth, only allow to login via Google for existing users.

Cox Dev
  • 41
  • 2

1 Answers1

0

Yes Cox, you can use this pipeline but pay attention because according to the django doc :

This pipeline entry is not 100% secure unless you know that the providers enabled enforce email verification on their side, otherwise a user can attempt to take over another user account by using the same (not validated) email address on some provider.