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 <38692350+fgerschwiler@users.noreply.github.com>
This commit is contained in:
Livio Amstutz
2021-08-02 15:24:58 +02:00
committed by GitHub
parent 9b5cb38d62
commit 00220e9532
60 changed files with 2916 additions and 350 deletions

View File

@@ -851,13 +851,52 @@ Returns the custom text for domain claimed message (overwritten in eventstore)
[SetDefaultDomainClaimedMessageTextResponse](#setdefaultdomainclaimedmessagetextresponse)
Sets the default custom text for domain claimed phone message
it impacts all organisations without customized verify phone message text
it impacts all organisations without customized domain claimed message text
The Following Variables can be used:
{{.Domain}} {{.TempUsername}} {{.UserName}} {{.FirstName}} {{.LastName}} {{.NickName}} {{.DisplayName}} {{.LastEmail}} {{.VerifiedEmail}} {{.LastPhone}} {{.VerifiedPhone}} {{.PreferredLoginName}} {{.LoginNames}} {{.ChangeDate}}
PUT: /text/message/verifyphone/{language}
PUT: /text/message/domainclaimed/{language}
### GetDefaultPasswordlessRegistrationMessageText
> **rpc** GetDefaultPasswordlessRegistrationMessageText([GetDefaultPasswordlessRegistrationMessageTextRequest](#getdefaultpasswordlessregistrationmessagetextrequest))
[GetDefaultPasswordlessRegistrationMessageTextResponse](#getdefaultpasswordlessregistrationmessagetextresponse)
Returns the default text for passwordless registration message (translation file)
GET: /text/default/message/passwordless_registration/{language}
### GetCustomPasswordlessRegistrationMessageText
> **rpc** GetCustomPasswordlessRegistrationMessageText([GetCustomPasswordlessRegistrationMessageTextRequest](#getcustompasswordlessregistrationmessagetextrequest))
[GetCustomPasswordlessRegistrationMessageTextResponse](#getcustompasswordlessregistrationmessagetextresponse)
Returns the custom text for passwordless registration message (overwritten in eventstore)
GET: /text/message/passwordless_registration/{language}
### SetDefaultPasswordlessRegistrationMessageText
> **rpc** SetDefaultPasswordlessRegistrationMessageText([SetDefaultPasswordlessRegistrationMessageTextRequest](#setdefaultpasswordlessregistrationmessagetextrequest))
[SetDefaultPasswordlessRegistrationMessageTextResponse](#setdefaultpasswordlessregistrationmessagetextresponse)
Sets the default custom text for passwordless registration message
it impacts all organisations without customized passwordless registration message text
The Following Variables can be used:
{{.UserName}} {{.FirstName}} {{.LastName}} {{.NickName}} {{.DisplayName}} {{.LastEmail}} {{.VerifiedEmail}} {{.LastPhone}} {{.VerifiedPhone}} {{.PreferredLoginName}} {{.LoginNames}} {{.ChangeDate}}
PUT: /text/message/passwordless_registration/{language}
### GetDefaultLoginTexts
@@ -1366,6 +1405,28 @@ This is an empty response
### GetCustomPasswordlessRegistrationMessageTextRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| language | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
### GetCustomPasswordlessRegistrationMessageTextResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| custom_text | zitadel.text.v1.MessageCustomText | - | |
### GetCustomVerifyEmailMessageTextRequest
@@ -1515,6 +1576,28 @@ This is an empty response
### GetDefaultPasswordlessRegistrationMessageTextRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| language | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
### GetDefaultPasswordlessRegistrationMessageTextResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| custom_text | zitadel.text.v1.MessageCustomText | - | |
### GetDefaultVerifyEmailMessageTextRequest
@@ -2351,6 +2434,9 @@ This is an empty request
| success_login_text | zitadel.text.v1.SuccessLoginScreenText | - | |
| logout_text | zitadel.text.v1.LogoutDoneScreenText | - | |
| footer_text | zitadel.text.v1.FooterText | - | |
| passwordless_prompt_text | zitadel.text.v1.PasswordlessPromptScreenText | - | |
| passwordless_registration_text | zitadel.text.v1.PasswordlessRegistrationScreenText | - | |
| passwordless_registration_done_text | zitadel.text.v1.PasswordlessRegistrationDoneScreenText | - | |
@@ -2490,6 +2576,35 @@ This is an empty request
### SetDefaultPasswordlessRegistrationMessageTextRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| language | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| title | string | - | string.max_len: 200<br /> |
| pre_header | string | - | string.max_len: 200<br /> |
| subject | string | - | string.max_len: 200<br /> |
| greeting | string | - | string.max_len: 200<br /> |
| text | string | - | string.max_len: 800<br /> |
| button_text | string | - | string.max_len: 200<br /> |
| footer_text | string | - | string.max_len: 200<br /> |
### SetDefaultPasswordlessRegistrationMessageTextResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
### SetDefaultVerifyEmailMessageTextRequest

View File

@@ -401,7 +401,7 @@ Removes the U2F Authentication from the authorized user
> **rpc** ListMyPasswordless([ListMyPasswordlessRequest](#listmypasswordlessrequest))
[ListMyPasswordlessResponse](#listmypasswordlessresponse)
Returns all configured passwordless authentications of the authorized user
Returns all configured passwordless authenticators of the authorized user
@@ -413,7 +413,7 @@ Returns all configured passwordless authentications of the authorized user
> **rpc** AddMyPasswordless([AddMyPasswordlessRequest](#addmypasswordlessrequest))
[AddMyPasswordlessResponse](#addmypasswordlessresponse)
Adds a new passwordless authentications to the authorized user
Adds a new passwordless authenticator to the authorized user
Multiple passwordless authentications can be configured
@@ -421,6 +421,34 @@ Multiple passwordless authentications can be configured
POST: /users/me/passwordless
### AddMyPasswordlessLink
> **rpc** AddMyPasswordlessLink([AddMyPasswordlessLinkRequest](#addmypasswordlesslinkrequest))
[AddMyPasswordlessLinkResponse](#addmypasswordlesslinkresponse)
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
POST: /users/me/passwordless/_link
### SendMyPasswordlessLink
> **rpc** SendMyPasswordlessLink([SendMyPasswordlessLinkRequest](#sendmypasswordlesslinkrequest))
[SendMyPasswordlessLinkResponse](#sendmypasswordlesslinkresponse)
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
POST: /users/me/passwordless/_send_link
### VerifyMyPasswordless
> **rpc** VerifyMyPasswordless([VerifyMyPasswordlessRequest](#verifymypasswordlessrequest))
@@ -550,6 +578,25 @@ This is an empty request
### AddMyPasswordlessLinkRequest
This is an empty request
### AddMyPasswordlessLinkResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
| link | string | - | |
| expiration | google.protobuf.Duration | - | |
### AddMyPasswordlessRequest
This is an empty request
@@ -1086,6 +1133,23 @@ This is an empty response
### SendMyPasswordlessLinkRequest
This is an empty request
### SendMyPasswordlessLinkResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
### SetMyEmailRequest

View File

@@ -450,19 +450,33 @@ The u2f (universial second factor) will be removed from the user
> **rpc** ListHumanPasswordless([ListHumanPasswordlessRequest](#listhumanpasswordlessrequest))
[ListHumanPasswordlessResponse](#listhumanpasswordlessresponse)
Returns all configured passwordless authentications
Returns all configured passwordless authenticators
POST: /users/{user_id}/passwordless/_search
### SendPasswordlessRegistration
> **rpc** SendPasswordlessRegistration([SendPasswordlessRegistrationRequest](#sendpasswordlessregistrationrequest))
[SendPasswordlessRegistrationResponse](#sendpasswordlessregistrationresponse)
Adds a new passwordless authenticator link to the 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
POST: /users/{user_id}/passwordless/_send_link
### RemoveHumanPasswordless
> **rpc** RemoveHumanPasswordless([RemoveHumanPasswordlessRequest](#removehumanpasswordlessrequest))
[RemoveHumanPasswordlessResponse](#removehumanpasswordlessresponse)
Removed a configured passwordless authentication
Removed a configured passwordless authenticator
@@ -2144,8 +2158,7 @@ Returns the default text for initial message
> **rpc** SetCustomInitMessageText([SetCustomInitMessageTextRequest](#setcustominitmessagetextrequest))
[SetCustomInitMessageTextResponse](#setcustominitmessagetextresponse)
Sets the default custom text for initial message
it impacts all organisations without customized initial message text
Sets the custom text for initial message
The Following Variables can be used:
{{.Code}} {{.UserName}} {{.FirstName}} {{.LastName}} {{.NickName}} {{.DisplayName}} {{.LastEmail}} {{.VerifiedEmail}} {{.LastPhone}} {{.VerifiedPhone}} {{.PreferredLoginName}} {{.LoginNames}} {{.ChangeDate}}
@@ -2196,8 +2209,7 @@ Returns the default text for password reset message
> **rpc** SetCustomPasswordResetMessageText([SetCustomPasswordResetMessageTextRequest](#setcustompasswordresetmessagetextrequest))
[SetCustomPasswordResetMessageTextResponse](#setcustompasswordresetmessagetextresponse)
Sets the default custom text for password reset message
it impacts all organisations without customized password reset message text
Sets the custom text for password reset message
The Following Variables can be used:
{{.Code}} {{.UserName}} {{.FirstName}} {{.LastName}} {{.NickName}} {{.DisplayName}} {{.LastEmail}} {{.VerifiedEmail}} {{.LastPhone}} {{.VerifiedPhone}} {{.PreferredLoginName}} {{.LoginNames}} {{.ChangeDate}}
@@ -2248,8 +2260,7 @@ Returns the default text for verify email message
> **rpc** SetCustomVerifyEmailMessageText([SetCustomVerifyEmailMessageTextRequest](#setcustomverifyemailmessagetextrequest))
[SetCustomVerifyEmailMessageTextResponse](#setcustomverifyemailmessagetextresponse)
Sets the default custom text for verify email message
it impacts all organisations without customized verify email message text
Sets the custom text for verify email message
The Following Variables can be used:
{{.Code}} {{.UserName}} {{.FirstName}} {{.LastName}} {{.NickName}} {{.DisplayName}} {{.LastEmail}} {{.VerifiedEmail}} {{.LastPhone}} {{.VerifiedPhone}} {{.PreferredLoginName}} {{.LoginNames}} {{.ChangeDate}}
@@ -2301,7 +2312,6 @@ Returns the custom text for verify email message
[SetCustomVerifyPhoneMessageTextResponse](#setcustomverifyphonemessagetextresponse)
Sets the default custom text for verify email message
it impacts all organisations without customized verify email message text
The Following Variables can be used:
{{.Code}} {{.UserName}} {{.FirstName}} {{.LastName}} {{.NickName}} {{.DisplayName}} {{.LastEmail}} {{.VerifiedEmail}} {{.LastPhone}} {{.VerifiedPhone}} {{.PreferredLoginName}} {{.LoginNames}} {{.ChangeDate}}
@@ -2352,8 +2362,7 @@ Returns the custom text for domain claimed message
> **rpc** SetCustomDomainClaimedMessageCustomText([SetCustomDomainClaimedMessageTextRequest](#setcustomdomainclaimedmessagetextrequest))
[SetCustomDomainClaimedMessageTextResponse](#setcustomdomainclaimedmessagetextresponse)
Sets the default custom text for domain claimed message
it impacts all organisations without customized domain claimed message text
Sets the custom text for domain claimed message
The Following Variables can be used:
{{.Domain}} {{.TempUsername}} {{.UserName}} {{.FirstName}} {{.LastName}} {{.NickName}} {{.DisplayName}} {{.LastEmail}} {{.VerifiedEmail}} {{.LastPhone}} {{.VerifiedPhone}} {{.PreferredLoginName}} {{.LoginNames}} {{.ChangeDate}}
@@ -2367,7 +2376,7 @@ The Following Variables can be used:
> **rpc** ResetCustomDomainClaimedMessageTextToDefault([ResetCustomDomainClaimedMessageTextToDefaultRequest](#resetcustomdomainclaimedmessagetexttodefaultrequest))
[ResetCustomDomainClaimedMessageTextToDefaultResponse](#resetcustomdomainclaimedmessagetexttodefaultresponse)
Removes the custom init message text of the organisation
Removes the custom domain claimed message text of the organisation
The default text of the IAM will trigger after
@@ -2375,6 +2384,57 @@ The default text of the IAM will trigger after
DELETE: /text/message/domainclaimed/{language}
### GetCustomPasswordlessRegistrationMessageText
> **rpc** GetCustomPasswordlessRegistrationMessageText([GetCustomPasswordlessRegistrationMessageTextRequest](#getcustompasswordlessregistrationmessagetextrequest))
[GetCustomPasswordlessRegistrationMessageTextResponse](#getcustompasswordlessregistrationmessagetextresponse)
Returns the custom text for passwordless link message
GET: /text/message/passwordless_registration/{language}
### GetDefaultPasswordlessRegistrationMessageText
> **rpc** GetDefaultPasswordlessRegistrationMessageText([GetDefaultPasswordlessRegistrationMessageTextRequest](#getdefaultpasswordlessregistrationmessagetextrequest))
[GetDefaultPasswordlessRegistrationMessageTextResponse](#getdefaultpasswordlessregistrationmessagetextresponse)
Returns the custom text for passwordless link message
GET: /text/default/message/passwordless_registration/{language}
### SetCustomPasswordlessRegistrationMessageCustomText
> **rpc** SetCustomPasswordlessRegistrationMessageCustomText([SetCustomPasswordlessRegistrationMessageTextRequest](#setcustompasswordlessregistrationmessagetextrequest))
[SetCustomPasswordlessRegistrationMessageTextResponse](#setcustompasswordlessregistrationmessagetextresponse)
Sets the custom text for passwordless link message
The Following Variables can be used:
{{.UserName}} {{.FirstName}} {{.LastName}} {{.NickName}} {{.DisplayName}} {{.LastEmail}} {{.VerifiedEmail}} {{.LastPhone}} {{.VerifiedPhone}} {{.PreferredLoginName}} {{.LoginNames}} {{.ChangeDate}}
PUT: /text/message/passwordless_registration/{language}
### ResetCustomPasswordlessRegistrationMessageTextToDefault
> **rpc** ResetCustomPasswordlessRegistrationMessageTextToDefault([ResetCustomPasswordlessRegistrationMessageTextToDefaultRequest](#resetcustompasswordlessregistrationmessagetexttodefaultrequest))
[ResetCustomPasswordlessRegistrationMessageTextToDefaultResponse](#resetcustompasswordlessregistrationmessagetexttodefaultresponse)
Removes the custom passwordless link message text of the organisation
The default text of the IAM will trigger after
DELETE: /text/message/passwordless_registration/{language}
### GetCustomLoginTexts
> **rpc** GetCustomLoginTexts([GetCustomLoginTextsRequest](#getcustomlogintextsrequest))
@@ -3598,6 +3658,28 @@ This is an empty request
### GetCustomPasswordlessRegistrationMessageTextRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| language | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
### GetCustomPasswordlessRegistrationMessageTextResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| custom_text | zitadel.text.v1.MessageCustomText | - | |
### GetCustomVerifyEmailMessageTextRequest
@@ -3815,6 +3897,28 @@ This is an empty request
### GetDefaultPasswordlessRegistrationMessageTextRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| language | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
### GetDefaultPasswordlessRegistrationMessageTextResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| custom_text | zitadel.text.v1.MessageCustomText | - | |
### GetDefaultPrivacyPolicyRequest
This is an empty request
@@ -4413,6 +4517,7 @@ This is an empty response
| phone | ImportHumanUserRequest.Phone | - | |
| password | string | - | |
| password_change_required | bool | - | |
| request_passwordless_registration | bool | - | |
@@ -4465,6 +4570,19 @@ This is an empty response
| ----- | ---- | ----------- | ----------- |
| user_id | string | - | |
| details | zitadel.v1.ObjectDetails | - | |
| passwordless_registration | ImportHumanUserResponse.PasswordlessRegistration | - | |
### ImportHumanUserResponse.PasswordlessRegistration
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| link | string | - | |
| lifetime | google.protobuf.Duration | - | |
@@ -6127,6 +6245,28 @@ This is an empty request
### ResetCustomPasswordlessRegistrationMessageTextToDefaultRequest
This is an empty request
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| language | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
### ResetCustomPasswordlessRegistrationMessageTextToDefaultResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
### ResetCustomVerifyEmailMessageTextToDefaultRequest
@@ -6296,6 +6436,28 @@ This is an empty request
### SendPasswordlessRegistrationRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| user_id | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
### SendPasswordlessRegistrationResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
### SetCustomDomainClaimedMessageTextRequest
@@ -6391,6 +6553,9 @@ This is an empty request
| success_login_text | zitadel.text.v1.SuccessLoginScreenText | - | |
| logout_text | zitadel.text.v1.LogoutDoneScreenText | - | |
| footer_text | zitadel.text.v1.FooterText | - | |
| passwordless_prompt_text | zitadel.text.v1.PasswordlessPromptScreenText | - | |
| passwordless_registration_text | zitadel.text.v1.PasswordlessRegistrationScreenText | - | |
| passwordless_registration_done_text | zitadel.text.v1.PasswordlessRegistrationDoneScreenText | - | |
@@ -6435,6 +6600,35 @@ This is an empty request
### SetCustomPasswordlessRegistrationMessageTextRequest
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| language | string | - | string.min_len: 1<br /> string.max_len: 200<br /> |
| title | string | - | string.max_len: 200<br /> |
| pre_header | string | - | string.max_len: 200<br /> |
| subject | string | - | string.max_len: 200<br /> |
| greeting | string | - | string.max_len: 200<br /> |
| text | string | - | string.max_len: 800<br /> |
| button_text | string | - | string.max_len: 200<br /> |
| footer_text | string | - | string.max_len: 200<br /> |
### SetCustomPasswordlessRegistrationMessageTextResponse
| Field | Type | Description | Validation |
| ----- | ---- | ----------- | ----------- |
| details | zitadel.v1.ObjectDetails | - | |
### SetCustomVerifyEmailMessageTextRequest