python - Disable user registration with django-social-auth -
i know if knows if there way make django-social-auth throw error if social account not associated site account , not register new user?
you can make possible overriding pipeline setting 1 drops create_user
entry (there's example in pipeline docs @ http://django-social-auth.readthedocs.org/en/latest/pipeline.html). define setting:
social_auth_pipeline = ( 'social_auth.backends.pipeline.social.social_auth_user', 'social_auth.backends.pipeline.social.associate_user', 'social_auth.backends.pipeline.social.load_extra_data', 'social_auth.backends.pipeline.user.update_user_details' )
also add own entry check you, this:
def user_must_exists(user=none, *args, **kwargs): if user none: raise yourexceptionhere()
Comments
Post a Comment