New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partial pipeline doesn't restore user model #198
Comments
Hi, My pipeline is also very similar
The problem seems starting in SHA: 228b36b. Cheers |
@gglentini seems to be it! This commit has changed user precedence so the user from session is overridden by the argument of |
@w0rm, @gglentini could you try the fix above? |
Should be working. I'm sorry I've already reorganised my pipeline so the user is created after email validation and password hash is set in details dict and copied to user on create_user step. @gglentini can you check if it works in your implementation? |
Yep, I confirm the fix is properly working. |
Thanks, closing the issue. |
Hello. You've made a really good library. I am not very experienced in Python, but it took me only one day to integrate social login into my small web.py app. Very productive!
Today I took another step and wanted to implement regular email+password login/registration. So I created two pipeline items:
user_password
andmail_validation
that only work withemail
backend. The first one sets password for new user and validates password if user exists. It needs user model to exist, so I have placed it right aftercreate_user
. And the second one is partial, its a copy of defaultmail_validation
except that it runs validation only for the new users.I have a problem that
user
is not restored after resumingmail_validation
partial pipeline, and ifuser
isNone
then authentication doesn't happen. I've checked the code and found thatuser=user_id
is saved to session with all data from partial pipeline, but then it is overridden by theuser
fromdo_complete
call.do_complete
action has the following lineAnd inside
partial_pipeline_data
is the code that replaces user from session with value passed from do_complete which may be None (please check my comments in the following bit of code):Here is my complete pipeline:
The text was updated successfully, but these errors were encountered: