-
Notifications
You must be signed in to change notification settings - Fork 16
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
Rework how email verification works #3784
Conversation
Deploying matrix-authentication-service-docs with Cloudflare Pages
|
58f4749
to
59170a3
Compare
e708212
to
7c57d09
Compare
59170a3
to
73f2840
Compare
73f2840
to
89082a7
Compare
This considers all user_emails as confirmed, and removes the verification code. It will be replaced by a new email authentication code flow
bda2b00
to
5638b67
Compare
5638b67
to
d65286d
Compare
45d4218
to
24999ef
Compare
24999ef
to
a39e1d3
Compare
a39e1d3
to
ef74d47
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 is a chunky one! But in principle I'm happy with most of what's here.
I have left .
s on things that looked like they'd be worth getting back to and wasn't sure if you would have done in later commits, but now I can't easily see those comments again because the diff is too big it won't load nicely :D.
I'd like to more carefully consider the security and privacy aspects of the registration flow; I've spotted some issues but am not sure there aren't others.
Co-authored-by: reivilibre <[email protected]>
@reivilibre I think I've gone through all your comments. I've introduced rate limiting and made it so that we disclose that the email is already in use only after verifying. I'm waiting for proper design for those screens, but what I have in the meantime is probably fine, and can be adjusted later. |
|
||
// Convert to lowercase to prevent bypassing the limit by enumerating different | ||
// case variations. | ||
// A case-folding transformation may be more proper. |
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.
maybe so, but this is likely good enough. I don't think non-ASCII e-mail localparts are common at all? I have never seen one in the real-world.
To be useful, we'd have to assume the recipient server is also doing casefolding transformations. I am sceptical.
All in all, happy with just lowercasing
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.
email: userEmailAuthentication.email, | ||
})} | ||
/> | ||
|
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.
if it's not too hard to do, I'd be tempted to add a button along the lines of 'Forgot your password? Click here to recover your account' and it would be as though the user submitted the account recovery form — i.e. it would send the recovery e-mail immediately
If the user logged in with a upstream provider, maybe we could remind them which one they used, such as 'You can log in to your account using Google'
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.
(if preferred, could also defer this to an issue for later)
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.
I've asked design to have a look, will iterate on that later
This completely redesigns how email verification works.
Fixes #3112
Fixes #2881
Helps with #1505
This is meant to be reviewed commit by commit
As per the task list bellow, it's missing a few little things, but those are details that can be tackled later, and I'll open individual issues for them.
Tasks
Quick screen recording on how it looks:
output.mp4