-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat(user): Adds logic to handle authentication. #258
Conversation
Tests are failing and this is marked as a draft, but you're doing other work. Should I take a deeper look here or wait? |
This commit adds a dropdown menu with the profile and the logout button to the header template
This commit adds a receiver method to add the activation key and tweak the email_confirmed field to super user records
81e6b6e
to
cb1cc69
Compare
562a9bd
to
404a321
Compare
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.
This looks pretty good, but there are some tricky changes that I'd suggest.
Thank you!
Oh, one other thing. All of our account-related views need to avoid the CDN, right? Or at least some of them do? |
176cb13
to
906a1d1
Compare
This commit introduces the following changes: - Removes the crypto module. - Removes the activation_key and the key_expires field from the User model. - Adds a new method in the User class get the signed pk. - Initialize a TimestampSigner object as a class attribute of the Users class. - Updates the superuser_creation signal to remove the old fields of the user model. - Tweak the register, request email confirmation and email confirmation views. - Tweak the URL pattern that matches the email confirmation view.
This commit updates the script_src and the default_src directives to add hcaptcha as a valid source.
Thanks for your comments. I've applied all your suggestions. I tweaked the registration page to use hcaptcha and also added a new ratelimit decorator to create a global counter to limit the OTOH, I reviewed the new account views and noticed the only one that needs to avoid the CDN is the Successful Registration page but that one should work fine because it uses the query string to get the data that renders on the page and we tweaked the cache policy to forward the query strings to the origin ( we did this to fix the add-a-case form). Let me know what you think. |
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.
Just a couple things. Thank you!
This is merged. Will you please create an issue in CL to update the way it does email verification URLs? Maybe put some notes or links to this in there so we can just do this same code over there? |
This PR fixes #202 and also closes #203.
This PR adds a dropdown menu next to the Donate button in the header. This dropdown menu has a button to
sign out
and a link to the profile page.Here's a screenshot of the new dropdown menu:
This PR also introduces the views and templates to register, reset the password and request the email confirmation link.
Here are screenshots of the new pages:
Signed out page:
Register form:
Successful Registration
Successful Email Confirmation
Invalid confirmation link
Expired confirmation link
Reset Your Password