Save password and username when using email authentication

200 views
Skip to first unread message

Matthew Cooper

unread,
Dec 3, 2013, 8:40:05 AM12/3/13
to python-so...@googlegroups.com
First up let me say how great python-social-auth is, I'm really enjoying working with it.

I've got the email backend working with the signup forms, really works well. For standard email signups I want to use the email authentication as well, so I added this in which works fine.

However, I also added the password handling code into the pipeline after the user create as suggested in the docs. However, these values, password and username are obviously not stored in the session as they are empty when the user is added after the validation link is clicked.

So I'm wondering how you would suggest I can implement this? I guess I could override the pipeline in mail_validation and save them there?

Any advice on the the best practice here would be great

Here is my pipeline:

SOCIAL_AUTH_PIPELINE = (
    'social.pipeline.social_auth.social_details',
    'social.pipeline.social_auth.social_uid',
    'social.pipeline.social_auth.auth_allowed',
    'social.pipeline.social_auth.social_user',
    'social.pipeline.social_auth.associate_by_email',
    'social.pipeline.user.get_username',
    #'social.pipeline.mail.mail_validation', #only for email backend
    'social.pipeline.user.create_user',
    'auth.pipeline.user_password', #set password
    'social.pipeline.social_auth.associate_user',
    'social.pipeline.social_auth.load_extra_data',
    'social.pipeline.user.user_details',
)

Thanks
Matt


Brett Coover

unread,
Apr 18, 2015, 11:52:47 PM4/18/15
to python-so...@googlegroups.com
Did you ever figure this out? I've been trying to get this to work in some way for hours now... I just want to actually save the password....
Reply all
Reply to author
Forward
0 new messages