-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update user registration #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool functionality added and I do like the _choice_with_retries
, the main thing that I would think should be improved is to have a separate loop for the email address validity, the password following our rules and the passwords matching
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I ask for one more tiny thing: now that we have None as an option in the DB, could you please set empty inputs to None. Right now we would still save empty strings in the DB, if I read the code right.
Otherwise: This looks great! Thanks a lot!
I used approve as I don't think there is another review necessary after fixing the None thing above.
Perfect, thanks. :) |
ah great! this is ready to be merged without a second review |
This PR introduces the following things:
Allowing retries
Update registration and login functions such that they return if the login/registration was successfull and the response of the server. If the attempt was not successfull, print the response of the server (e.g. 'Weak Password') and restart the registration/login process.
Asking additional questions
After the registration process that we had before is finished, ask the user a few more questions, which are optional. We can fine-tune the exact wording. The information entered is then sent to the server in a second request. The user is already added to the database after the first request (which we already had before). I thought this was simplest way to do it, if we send everything in one request, all the answers to the questions will have to be entered again if there was a problem at the beginning, e.g. with the password.
If you have further ideas/thoughts on this please let me know :)