feat(login): additionally use email/phone for authentication (#4563)

* feat: add ability to disable login by email and phone

* feat: check login by email and phone

* fix: set verified email / phone correctly on notify users

* update projection version

* fix merge

* fix email/phone verified reduce tests

* fix user tests

* loginname check

* cleanup

* fix: update user projection version to handle fixed statement
This commit is contained in:
Livio Spring
2022-10-17 21:19:15 +02:00
committed by GitHub
parent 9ae58b62fd
commit b0b1e94090
54 changed files with 1245 additions and 768 deletions

View File

@@ -3916,6 +3916,16 @@ message UpdateLoginPolicyRequest {
description: "If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organisation on success."
}
];
bool disable_login_with_email = 15 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if user can additionally (to the loginname) be identified by their verified email address"
}
];
bool disable_login_with_phone = 16 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if user can additionally (to the loginname) be identified by their verified phone number"
}
];
}
message UpdateLoginPolicyResponse {

View File

@@ -4611,6 +4611,16 @@ message AddCustomLoginPolicyRequest {
description: "If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organisation on success."
}
];
bool disable_login_with_email = 18 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if user can additionally (to the loginname) be identified by their verified email address"
}
];
bool disable_login_with_phone = 19 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if user can additionally (to the loginname) be identified by their verified phone number"
}
];
}
message AddCustomLoginPolicyResponse {
@@ -4645,6 +4655,16 @@ message UpdateCustomLoginPolicyRequest {
description: "If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organisation on success."
}
];
bool disable_login_with_email = 15 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if user can additionally (to the loginname) be identified by their verified email address"
}
];
bool disable_login_with_phone = 16 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if user can additionally (to the loginname) be identified by their verified phone number"
}
];
}
message UpdateCustomLoginPolicyResponse {

View File

@@ -179,6 +179,16 @@ message LoginPolicy {
description: "If set to true, the suffix (@domain.com) of an unknown username input on the login screen will be matched against the org domains and will redirect to the registration of that organisation on success."
}
];
bool disable_login_with_email = 20 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if user can additionally (to the loginname) be identified by their verified email address"
}
];
bool disable_login_with_phone = 21 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
description: "defines if user can additionally (to the loginname) be identified by their verified phone number"
}
];
}
enum SecondFactorType {