mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-29 07:28:52 +00:00
feat: passwordless registration (#2103)
* begin pw less registration * create pwless one time codes * send pwless link * separate send and add passwordless link * separate send and add passwordless link events * custom message text for passwordless registration * begin custom login texts for passwordless * i18n * i18n message * i18n message * custom message text * custom login text * org design and texts * create link in human import process * fix import human tests * begin passwordless init required step * passwordless init * passwordless init * do not return link in mgmt api * prompt * passwordless init only (no additional prompt) * cleanup * cleanup * add passwordless prompt to custom login text * increase init code complexity * fix grpc * cleanup * fix and add some cases for nextStep tests * fix tests * Update internal/notification/static/i18n/en.yaml * Update internal/notification/static/i18n/de.yaml * Update proto/zitadel/management.proto * Update internal/ui/login/static/i18n/de.yaml * Update internal/ui/login/static/i18n/de.yaml * Update internal/ui/login/static/i18n/de.yaml Co-authored-by: Fabi <[email protected]>
This commit is contained in:
@@ -9,6 +9,7 @@ import "zitadel/policy.proto";
|
||||
import "zitadel/idp.proto";
|
||||
import "validate/validate.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
@@ -76,7 +77,7 @@ service AuthService {
|
||||
option (google.api.http) = {
|
||||
post: "/users/me/changes/_search"
|
||||
};
|
||||
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "authenticated"
|
||||
};
|
||||
@@ -132,7 +133,7 @@ service AuthService {
|
||||
put: "/users/me/username"
|
||||
body: "*"
|
||||
};
|
||||
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "authenticated"
|
||||
};
|
||||
@@ -407,7 +408,7 @@ service AuthService {
|
||||
};
|
||||
}
|
||||
|
||||
// Returns all configured passwordless authentications of the authorized user
|
||||
// Returns all configured passwordless authenticators of the authorized user
|
||||
rpc ListMyPasswordless(ListMyPasswordlessRequest) returns (ListMyPasswordlessResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/users/me/passwordless/_search"
|
||||
@@ -417,7 +418,7 @@ service AuthService {
|
||||
};
|
||||
}
|
||||
|
||||
// Adds a new passwordless authentications to the authorized user
|
||||
// Adds a new passwordless authenticator to the authorized user
|
||||
// Multiple passwordless authentications can be configured
|
||||
rpc AddMyPasswordless(AddMyPasswordlessRequest) returns (AddMyPasswordlessResponse) {
|
||||
option (google.api.http) = {
|
||||
@@ -429,6 +430,32 @@ service AuthService {
|
||||
};
|
||||
}
|
||||
|
||||
// Adds a new passwordless authenticator link to the authorized user and returns it directly
|
||||
// This link enables the user to register a new device if current passwordless devices are all platform authenticators
|
||||
// e.g. User has already registered Windows Hello and wants to register FaceID on the iPhone
|
||||
rpc AddMyPasswordlessLink(AddMyPasswordlessLinkRequest) returns (AddMyPasswordlessLinkResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/users/me/passwordless/_link"
|
||||
body: "*"
|
||||
};
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "authenticated"
|
||||
};
|
||||
}
|
||||
|
||||
// Adds a new passwordless authenticator link to the authorized user and sends it to the registered email address
|
||||
// This link enables the user to register a new device if current passwordless devices are all platform authenticators
|
||||
// e.g. User has already registered Windows Hello and wants to register FaceID on the iPhone
|
||||
rpc SendMyPasswordlessLink(SendMyPasswordlessLinkRequest) returns (SendMyPasswordlessLinkResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/users/me/passwordless/_send_link"
|
||||
body: "*"
|
||||
};
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "authenticated"
|
||||
};
|
||||
}
|
||||
|
||||
// Verifies the last added passwordless configuration
|
||||
rpc VerifyMyPasswordless(VerifyMyPasswordlessRequest) returns (VerifyMyPasswordlessResponse) {
|
||||
option (google.api.http) = {
|
||||
@@ -775,7 +802,7 @@ message RemoveMyAuthFactorU2FResponse {
|
||||
message ListMyPasswordlessRequest {}
|
||||
|
||||
message ListMyPasswordlessResponse {
|
||||
repeated zitadel.user.v1.WebAuthNToken result = 1;
|
||||
repeated zitadel.user.v1.WebAuthNToken result = 1;
|
||||
}
|
||||
|
||||
//This is an empty request
|
||||
@@ -786,6 +813,22 @@ message AddMyPasswordlessResponse {
|
||||
zitadel.v1.ObjectDetails details = 2;
|
||||
}
|
||||
|
||||
//This is an empty request
|
||||
message AddMyPasswordlessLinkRequest {}
|
||||
|
||||
message AddMyPasswordlessLinkResponse {
|
||||
zitadel.v1.ObjectDetails details = 1;
|
||||
string link = 2;
|
||||
google.protobuf.Duration expiration = 3;
|
||||
}
|
||||
|
||||
//This is an empty request
|
||||
message SendMyPasswordlessLinkRequest {}
|
||||
|
||||
message SendMyPasswordlessLinkResponse {
|
||||
zitadel.v1.ObjectDetails details = 1;
|
||||
}
|
||||
|
||||
message VerifyMyPasswordlessRequest {
|
||||
zitadel.user.v1.WebAuthNVerification verification = 1 [(validate.rules).message.required = true];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user