-
Notifications
You must be signed in to change notification settings - Fork 37
email login_hint support when login_with_email_allowed is activated #4568
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
base: main
Are you sure you want to change the base?
Conversation
86e806c
to
34762a6
Compare
Might be re-adapted if this PR goes through : #4571 |
34762a6
to
9c9cc3d
Compare
@@ -142,6 +144,7 @@ impl AuthorizationGrantStage { | |||
|
|||
pub enum LoginHint<'a> { | |||
MXID(&'a UserId), | |||
EMAIL(lettre::Address), |
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.
In the case before, MXID is an ~acronym, hence the caps, but for emails it should follow the regular naming convention
EMAIL(lettre::Address), | |
Email(lettre::Address), |
@@ -197,6 +200,16 @@ impl AuthorizationGrant { | |||
|
|||
LoginHint::MXID(mxid) | |||
} | |||
"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.
I'm not convinced "email" should be a prefix. We've defined that in the MSC specifically for mxid:, but more generally, having emails as-is for login_hint is somewhat supported?
crates/data-model/Cargo.toml
Outdated
# Emails | ||
lettre.workspace = true |
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 you put that in the list of external crates up there without the comment for consistency?
0a1c9a2
to
52bb16b
Compare
52bb16b
to
07ac7ca
Compare
aecb1c9
to
7feb894
Compare
7feb894
to
704acfd
Compare
704acfd
to
2e23003
Compare
It is now possible to forward the login_hint with a mxid to the upstream providers thanks to #4512
This PR allows us to support the login_hint with an email when
login_with_email_allowed
is activated.In particular this PR will display the login_hint ie. email on the MAS login page.