Prevent linkbots from consuming tokens in one time links#4775
Conversation
wes-otf
left a comment
There was a problem hiding this comment.
Overall this looks and works fantastic! This is the solution we needed - you were also so fast about this!
There was a problem hiding this comment.
super nitpick but should we also add {% block body_class %}bg-base-200{% endblock %} after the title block? I like how that makes the card pop on the confirm template:
There was a problem hiding this comment.
Will look at that, we use the same style in many places so I make sure they all look the same.
There was a problem hiding this comment.
The background colour was missing from three templates, fixed now. Looks a lot nicer with it in place!
| <div class="flex flex-col justify-center items-center min-h-[60vh]"> | ||
| <section class="w-full max-w-2xl card shadow-xs bg-base-100 md:card-lg"> | ||
| <div class="items-center card-body"> | ||
| <span class="flex justify-center items-center mb-4 rounded-full bg-primary/10"> |
There was a problem hiding this comment.
this is so slick! I love the shadowy circle behind the icon
|
Been thinking about a solution for weeks and worked on it since last week, so not so fast 😃. |
… defaults on all link timeouts. Add seperate PASSWORD_ACTIVATION_TIMEOUT.
7da74b7 to
c728fab
Compare
|
great stuff, thanks @frjo ! |
Fixes HyphaApp#4535 OBS! `PASSWORD_RESET_TIMEOUT` have a new sane default of 15 minutes. A new timeout setting `PASSWORD_ACTIVATION_TIMEOUT` was added that also default to 15 minutes. `PASSWORD_RESET_TIMEOUT` used to default to 3 days to allow new users some time to activate their account. Organisation that still want the old default for activation mails can set `PASSWORD_ACTIVATION_TIMEOUT = 259200`. This is mainly a fix for MS Outlook mail system habit of doing a preview of links in all e-mails. This preview expires the one time links so when a user tries to login or reset their password it does not work. The solution is to show an extra confirmation screen with a login button, so users need to click one extra time. This solves the MicrosoftPreview issue and should work for any similar issues as well. During the work I found a number of inconsistencies in various login related templates that I also attempted to fix. That is the reson so many files are changes in this PR. ## Test Steps - [ ] Use the signup and passwordless login and confirm that you by clicking the link in the email come to a confirmation screen. Clicking the button there log you in to the site.
Fixes #4535
OBS!
PASSWORD_RESET_TIMEOUThave a new sane default of 15 minutes. A new timeout settingPASSWORD_ACTIVATION_TIMEOUTwas added that also default to 15 minutes.PASSWORD_RESET_TIMEOUTused to default to 3 days to allow new users some time to activate their account. Organisation that still want the old default for activation mails can setPASSWORD_ACTIVATION_TIMEOUT = 259200.This is mainly a fix for MS Outlook mail system habit of doing a preview of links in all e-mails. This preview expires the one time links so when a user tries to login or reset their password it does not work.
The solution is to show an extra confirmation screen with a login button, so users need to click one extra time. This solves the MicrosoftPreview issue and should work for any similar issues as well.
During the work I found a number of inconsistencies in various login related templates that I also attempted to fix. That is the reson so many files are changes in this PR.
Test Steps