@zitadel/config 0.1.0-alpha.17 → 0.1.0-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/defaults/README-branding.md +96 -0
- package/defaults/README-flows.md +21 -4
- package/defaults/README-schemas.md +2 -2
- package/defaults/branding/centered/login.liquid +164 -0
- package/defaults/branding/hero/login.liquid +224 -0
- package/defaults/branding/minimal/login.liquid +154 -0
- package/defaults/branding/split/login.liquid +183 -0
- package/defaults/branding/split-right/login.liquid +183 -0
- package/defaults/default-human-user.json +2 -19
- package/defaults/default-login.json +21 -4
- package/defaults/presets/passkey-first/human-user.json +2 -19
- package/defaults/presets/passkey-first/login.json +31 -4
- package/dist/branding-url.d.mts +14 -0
- package/dist/branding-url.d.mts.map +1 -0
- package/dist/branding-url.mjs +23 -0
- package/dist/branding-url.mjs.map +1 -0
- package/dist/defaults-Bh4_xVbh.d.mts +84 -0
- package/dist/defaults-Bh4_xVbh.d.mts.map +1 -0
- package/dist/defaults-eiGHyI5Y.mjs +569 -0
- package/dist/defaults-eiGHyI5Y.mjs.map +1 -0
- package/dist/defaults.d.mts +2 -2
- package/dist/defaults.mjs +2 -2
- package/dist/index.d.mts +6 -4
- package/dist/index.mjs +6 -4
- package/dist/{meta-schemas-8nlyVL7g.mjs → meta-schemas-CSc18JqO.mjs} +92 -31
- package/dist/meta-schemas-CSc18JqO.mjs.map +1 -0
- package/dist/meta-schemas.d.mts +6 -1
- package/dist/meta-schemas.d.mts.map +1 -1
- package/dist/meta-schemas.mjs +2 -2
- package/dist/normalize.d.mts +11 -9
- package/dist/normalize.d.mts.map +1 -1
- package/dist/normalize.mjs +24 -17
- package/dist/normalize.mjs.map +1 -1
- package/dist/schemas.d.mts +14 -1
- package/dist/schemas.d.mts.map +1 -1
- package/dist/schemas.mjs +62 -2
- package/dist/schemas.mjs.map +1 -1
- package/dist/template.d.mts +76 -0
- package/dist/template.d.mts.map +1 -0
- package/dist/template.mjs +145 -0
- package/dist/template.mjs.map +1 -0
- package/dist/validate.mjs +70 -11
- package/dist/validate.mjs.map +1 -1
- package/meta-schemas/auth-method.json +2 -7
- package/meta-schemas/branding.json +44 -0
- package/meta-schemas/flow-definition.json +20 -1
- package/meta-schemas/property-name.json +7 -0
- package/meta-schemas/user-property.json +8 -24
- package/meta-schemas/user-schema.json +4 -1
- package/package.json +17 -4
- package/dist/defaults-BQej3KIY.mjs +0 -388
- package/dist/defaults-BQej3KIY.mjs.map +0 -1
- package/dist/defaults-CSjBjBkQ.d.mts +0 -41
- package/dist/defaults-CSjBjBkQ.d.mts.map +0 -1
- package/dist/meta-schemas-8nlyVL7g.mjs.map +0 -1
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<zl-page-shell data-zl-template-root>
|
|
2
|
+
<section class="zl-minimal">
|
|
3
|
+
<h1 class="zl-card-title">{{ step.texts.title_key | t: identity.display_name }}</h1>
|
|
4
|
+
|
|
5
|
+
{% if errors and errors.size > 0 %}
|
|
6
|
+
{% for err in errors %}
|
|
7
|
+
{% if err | formLevelError %}
|
|
8
|
+
{% assign alert_heading = err.text_key | alertHeading %}
|
|
9
|
+
{% assign alert_body = err.text_key | alertBody %}
|
|
10
|
+
<zl-alert severity="error" dismissible data-zl-step-error{% if alert_heading != "" %} heading="{{ alert_heading | t }}"{% endif %}>
|
|
11
|
+
{% if alert_body != "" %}{{ alert_body | t }}{% elsif err.text_key %}{{ err.text_key | t }}{% else %}{{ err.message }}{% endif %}
|
|
12
|
+
</zl-alert>
|
|
13
|
+
{% endif %}
|
|
14
|
+
{% endfor %}
|
|
15
|
+
{% endif %}
|
|
16
|
+
|
|
17
|
+
{% for f in fields %}
|
|
18
|
+
{% assign field_placeholder = f.text_key | fieldPlaceholder %}
|
|
19
|
+
{% assign field_help = f.text_key | fieldHelp %}
|
|
20
|
+
{% assign field_err = f.name | fieldError: errors %}
|
|
21
|
+
{% case f.type %}
|
|
22
|
+
{% when 'checkbox' %}
|
|
23
|
+
<zl-checkbox
|
|
24
|
+
name="{{ f.name }}"
|
|
25
|
+
data-testid="zitadel-field-{{ f.name | testid }}"
|
|
26
|
+
label="{{ f.text_key | t }}"
|
|
27
|
+
value="true"
|
|
28
|
+
{% if f.value %}checked{% endif %}
|
|
29
|
+
{% if field_err != "" %}invalid error="{{ field_err }}"{% endif %}
|
|
30
|
+
></zl-checkbox>
|
|
31
|
+
{% when 'select' %}
|
|
32
|
+
<zl-select
|
|
33
|
+
name="{{ f.name }}"
|
|
34
|
+
data-testid="zitadel-field-{{ f.name | testid }}"
|
|
35
|
+
label="{{ f.text_key | t }}"
|
|
36
|
+
value="{{ f.value }}"
|
|
37
|
+
options='{{ f.validation.enum | selectOptions | json }}'
|
|
38
|
+
{% if f.required %}required{% endif %}
|
|
39
|
+
{% if field_placeholder != "" %}placeholder="{{ field_placeholder }}"{% endif %}
|
|
40
|
+
{% if field_err != "" %}invalid error="{{ field_err }}"{% endif %}
|
|
41
|
+
></zl-select>
|
|
42
|
+
{% else %}
|
|
43
|
+
{% assign autocomplete_val = '' %}
|
|
44
|
+
{% if f.name == 'email' %}
|
|
45
|
+
{% assign autocomplete_val = 'email' %}
|
|
46
|
+
{% elsif f.type == 'password' and step.name contains 'register' %}
|
|
47
|
+
{% assign autocomplete_val = 'new-password' %}
|
|
48
|
+
{% elsif f.type == 'password' %}
|
|
49
|
+
{% assign autocomplete_val = 'current-password' %}
|
|
50
|
+
{% endif %}
|
|
51
|
+
<zl-field
|
|
52
|
+
name="{{ f.name }}"
|
|
53
|
+
data-testid="zitadel-field-{{ f.name | testid }}"
|
|
54
|
+
label="{{ f.text_key | t }}"
|
|
55
|
+
type="{{ f.type }}"
|
|
56
|
+
value="{{ f.value }}"
|
|
57
|
+
{% if autocomplete_val != '' %}autocomplete="{{ autocomplete_val }}"{% endif %}
|
|
58
|
+
{% if f.required %}required{% endif %}
|
|
59
|
+
{% if field_placeholder != "" %}placeholder="{{ field_placeholder }}"{% endif %}
|
|
60
|
+
{% if field_err != "" %}invalid error="{{ field_err }}"{% endif %}
|
|
61
|
+
>
|
|
62
|
+
{% if field_help != "" %}
|
|
63
|
+
<span slot="help">{{ field_help }}</span>
|
|
64
|
+
{% endif %}
|
|
65
|
+
</zl-field>
|
|
66
|
+
{% endcase %}
|
|
67
|
+
{% endfor %}
|
|
68
|
+
|
|
69
|
+
{% assign recover = actions | where: "name", "recover" | first %}
|
|
70
|
+
{% if recover %}
|
|
71
|
+
<p class="zl-card-forgot">
|
|
72
|
+
<a href="#" class="zl-card-forgot__link" data-action="recover">{{ recover.text_key | t }}</a>
|
|
73
|
+
</p>
|
|
74
|
+
{% endif %}
|
|
75
|
+
|
|
76
|
+
{% for a in actions %}
|
|
77
|
+
{% if a.primary %}
|
|
78
|
+
<zl-button
|
|
79
|
+
hierarchy="primary"
|
|
80
|
+
size="medium"
|
|
81
|
+
type="submit"
|
|
82
|
+
block
|
|
83
|
+
action="{{ a.name }}"
|
|
84
|
+
data-testid="zitadel-action-{{ a.name }}"
|
|
85
|
+
label="{{ a.text_key | t }}"
|
|
86
|
+
{% if loading %}loading{% endif %}
|
|
87
|
+
></zl-button>
|
|
88
|
+
{% endif %}
|
|
89
|
+
{% endfor %}
|
|
90
|
+
|
|
91
|
+
{% for a in actions %}
|
|
92
|
+
{% unless a.primary or a.kind == 'back' or a.name == 'passkey' or a.name == 'register' or a.name == 'sign_in' or a.name == 'recover' %}
|
|
93
|
+
<zl-button
|
|
94
|
+
hierarchy="secondary"
|
|
95
|
+
size="medium"
|
|
96
|
+
type="button"
|
|
97
|
+
block
|
|
98
|
+
action="{{ a.name }}"
|
|
99
|
+
data-testid="zitadel-action-{{ a.name }}"
|
|
100
|
+
label="{{ a.text_key | t }}"
|
|
101
|
+
></zl-button>
|
|
102
|
+
{% endunless %}
|
|
103
|
+
{% endfor %}
|
|
104
|
+
|
|
105
|
+
{% assign passkey = actions | where: "name", "passkey" | first %}
|
|
106
|
+
{% if passkey %}
|
|
107
|
+
{% unless passkey.primary %}
|
|
108
|
+
<zl-button
|
|
109
|
+
hierarchy="secondary"
|
|
110
|
+
size="medium"
|
|
111
|
+
block
|
|
112
|
+
action="passkey"
|
|
113
|
+
data-testid="zitadel-action-passkey"
|
|
114
|
+
label="{{ passkey.text_key | t }}"
|
|
115
|
+
></zl-button>
|
|
116
|
+
{% endunless %}
|
|
117
|
+
{% endif %}
|
|
118
|
+
|
|
119
|
+
{% assign register = actions | where: "name", "register" | first %}
|
|
120
|
+
{% if register %}
|
|
121
|
+
<p class="zl-card-nav">
|
|
122
|
+
{{ 'identifier.action.register.lead' | t }}<a href="#" class="zl-card-nav__link" data-action="register" data-testid="zitadel-action-register-link">{{ 'identifier.action.register.link' | t }}</a>
|
|
123
|
+
</p>
|
|
124
|
+
{% endif %}
|
|
125
|
+
|
|
126
|
+
{% assign sign_in = actions | where: "name", "sign_in" | first %}
|
|
127
|
+
{% if sign_in %}
|
|
128
|
+
<p class="zl-card-nav">
|
|
129
|
+
{{ 'register.action.sign_in.lead' | t }}<a href="#" class="zl-card-nav__link" data-action="sign_in" data-testid="zitadel-action-sign_in-link">{{ 'register.action.sign_in.link' | t }}</a>
|
|
130
|
+
</p>
|
|
131
|
+
{% endif %}
|
|
132
|
+
|
|
133
|
+
{% if challenge %}
|
|
134
|
+
{% if challenge.method == "passkey" or challenge.method == "passkey_register" %}
|
|
135
|
+
{% assign ceremony = "authenticate" %}
|
|
136
|
+
{% assign submit_method = challenge.method %}
|
|
137
|
+
{% if challenge.method == "passkey_register" or challenge.options.user %}
|
|
138
|
+
{% assign ceremony = "register" %}
|
|
139
|
+
{% assign submit_method = "passkey_register" %}
|
|
140
|
+
{% endif %}
|
|
141
|
+
<zl-passkey
|
|
142
|
+
ceremony="{{ ceremony }}"
|
|
143
|
+
method="{{ submit_method }}"
|
|
144
|
+
challenge-id="{{ challenge.challenge_id }}"
|
|
145
|
+
options='{{ challenge.options | json }}'
|
|
146
|
+
pending-label="{{ 'passkey.pending.status' | t }}"
|
|
147
|
+
cancel-label="{{ 'action.cancel' | t }}"
|
|
148
|
+
></zl-passkey>
|
|
149
|
+
{% endif %}
|
|
150
|
+
{% endif %}
|
|
151
|
+
|
|
152
|
+
{% mandatory_gates %}
|
|
153
|
+
</section>
|
|
154
|
+
</zl-page-shell>
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
<zl-page-shell data-zl-template-root>
|
|
2
|
+
<div class="zl-split">
|
|
3
|
+
<aside class="zl-split__brand">
|
|
4
|
+
{% if branding.logo_url %}
|
|
5
|
+
<img class="zl-split__logo" src="{{ branding.logo_url }}" alt="" />
|
|
6
|
+
{% endif %}
|
|
7
|
+
{% if branding.hero_url %}
|
|
8
|
+
<img class="zl-split__hero" src="{{ branding.hero_url }}" alt="" />
|
|
9
|
+
{% endif %}
|
|
10
|
+
{% unless branding.logo_url or branding.hero_url %}
|
|
11
|
+
{% comment %} Until branding.json names an asset, a decorative panel
|
|
12
|
+
keeps the split composition readable. {% endcomment %}
|
|
13
|
+
<div class="zl-split__placeholder" aria-hidden="true"></div>
|
|
14
|
+
{% endunless %}
|
|
15
|
+
</aside>
|
|
16
|
+
<section class="zl-split__form">
|
|
17
|
+
{% if branding.logo_url %}
|
|
18
|
+
<img class="zl-split__compact" src="{{ branding.logo_url }}" alt="" />
|
|
19
|
+
{% elsif branding.hero_url %}
|
|
20
|
+
<img class="zl-split__compact zl-split__compact--hero" src="{{ branding.hero_url }}" alt="" />
|
|
21
|
+
{% endif %}
|
|
22
|
+
<zl-card>
|
|
23
|
+
<h1 slot="header" class="zl-card-title">{{ step.texts.title_key | t: identity.display_name }}</h1>
|
|
24
|
+
{% if step.texts.description_key %}
|
|
25
|
+
{% assign card_subtitle = step.texts.description_key | t: identity.display_name %}
|
|
26
|
+
{% if card_subtitle != "" %}
|
|
27
|
+
<p slot="header" class="zl-card-subtitle">{{ card_subtitle }}</p>
|
|
28
|
+
{% endif %}
|
|
29
|
+
{% endif %}
|
|
30
|
+
|
|
31
|
+
{% if errors and errors.size > 0 %}
|
|
32
|
+
{% for err in errors %}
|
|
33
|
+
{% if err | formLevelError %}
|
|
34
|
+
{% assign alert_heading = err.text_key | alertHeading %}
|
|
35
|
+
{% assign alert_body = err.text_key | alertBody %}
|
|
36
|
+
<zl-alert severity="error" dismissible data-zl-step-error{% if alert_heading != "" %} heading="{{ alert_heading | t }}"{% endif %}>
|
|
37
|
+
{% if alert_body != "" %}{{ alert_body | t }}{% elsif err.text_key %}{{ err.text_key | t }}{% else %}{{ err.message }}{% endif %}
|
|
38
|
+
</zl-alert>
|
|
39
|
+
{% endif %}
|
|
40
|
+
{% endfor %}
|
|
41
|
+
{% endif %}
|
|
42
|
+
|
|
43
|
+
{% for f in fields %}
|
|
44
|
+
{% assign field_placeholder = f.text_key | fieldPlaceholder %}
|
|
45
|
+
{% assign field_help = f.text_key | fieldHelp %}
|
|
46
|
+
{% assign field_err = f.name | fieldError: errors %}
|
|
47
|
+
{% case f.type %}
|
|
48
|
+
{% when 'checkbox' %}
|
|
49
|
+
<zl-checkbox
|
|
50
|
+
name="{{ f.name }}"
|
|
51
|
+
data-testid="zitadel-field-{{ f.name | testid }}"
|
|
52
|
+
label="{{ f.text_key | t }}"
|
|
53
|
+
value="true"
|
|
54
|
+
{% if f.value %}checked{% endif %}
|
|
55
|
+
{% if field_err != "" %}invalid error="{{ field_err }}"{% endif %}
|
|
56
|
+
></zl-checkbox>
|
|
57
|
+
{% when 'select' %}
|
|
58
|
+
<zl-select
|
|
59
|
+
name="{{ f.name }}"
|
|
60
|
+
data-testid="zitadel-field-{{ f.name | testid }}"
|
|
61
|
+
label="{{ f.text_key | t }}"
|
|
62
|
+
value="{{ f.value }}"
|
|
63
|
+
options='{{ f.validation.enum | selectOptions | json }}'
|
|
64
|
+
{% if f.required %}required{% endif %}
|
|
65
|
+
{% if field_placeholder != "" %}placeholder="{{ field_placeholder }}"{% endif %}
|
|
66
|
+
{% if field_err != "" %}invalid error="{{ field_err }}"{% endif %}
|
|
67
|
+
></zl-select>
|
|
68
|
+
{% else %}
|
|
69
|
+
{% assign autocomplete_val = '' %}
|
|
70
|
+
{% if f.name == 'email' %}
|
|
71
|
+
{% assign autocomplete_val = 'email' %}
|
|
72
|
+
{% elsif f.type == 'password' and step.name contains 'register' %}
|
|
73
|
+
{% assign autocomplete_val = 'new-password' %}
|
|
74
|
+
{% elsif f.type == 'password' %}
|
|
75
|
+
{% assign autocomplete_val = 'current-password' %}
|
|
76
|
+
{% endif %}
|
|
77
|
+
<zl-field
|
|
78
|
+
name="{{ f.name }}"
|
|
79
|
+
data-testid="zitadel-field-{{ f.name | testid }}"
|
|
80
|
+
label="{{ f.text_key | t }}"
|
|
81
|
+
type="{{ f.type }}"
|
|
82
|
+
value="{{ f.value }}"
|
|
83
|
+
{% if autocomplete_val != '' %}autocomplete="{{ autocomplete_val }}"{% endif %}
|
|
84
|
+
{% if f.required %}required{% endif %}
|
|
85
|
+
{% if field_placeholder != "" %}placeholder="{{ field_placeholder }}"{% endif %}
|
|
86
|
+
{% if field_err != "" %}invalid error="{{ field_err }}"{% endif %}
|
|
87
|
+
>
|
|
88
|
+
{% if field_help != "" %}
|
|
89
|
+
<span slot="help">{{ field_help }}</span>
|
|
90
|
+
{% endif %}
|
|
91
|
+
</zl-field>
|
|
92
|
+
{% endcase %}
|
|
93
|
+
{% endfor %}
|
|
94
|
+
|
|
95
|
+
{% assign recover = actions | where: "name", "recover" | first %}
|
|
96
|
+
{% if recover %}
|
|
97
|
+
<p class="zl-card-forgot">
|
|
98
|
+
<a href="#" class="zl-card-forgot__link" data-action="recover">{{ recover.text_key | t }}</a>
|
|
99
|
+
</p>
|
|
100
|
+
{% endif %}
|
|
101
|
+
|
|
102
|
+
{% for a in actions %}
|
|
103
|
+
{% if a.primary %}
|
|
104
|
+
<zl-button
|
|
105
|
+
hierarchy="primary"
|
|
106
|
+
size="medium"
|
|
107
|
+
type="submit"
|
|
108
|
+
block
|
|
109
|
+
action="{{ a.name }}"
|
|
110
|
+
data-testid="zitadel-action-{{ a.name }}"
|
|
111
|
+
label="{{ a.text_key | t }}"
|
|
112
|
+
{% if loading %}loading{% endif %}
|
|
113
|
+
></zl-button>
|
|
114
|
+
{% endif %}
|
|
115
|
+
{% endfor %}
|
|
116
|
+
|
|
117
|
+
{% for a in actions %}
|
|
118
|
+
{% unless a.primary or a.kind == 'back' or a.name == 'passkey' or a.name == 'register' or a.name == 'sign_in' or a.name == 'recover' %}
|
|
119
|
+
<zl-button
|
|
120
|
+
hierarchy="secondary"
|
|
121
|
+
size="medium"
|
|
122
|
+
type="button"
|
|
123
|
+
block
|
|
124
|
+
action="{{ a.name }}"
|
|
125
|
+
data-testid="zitadel-action-{{ a.name }}"
|
|
126
|
+
label="{{ a.text_key | t }}"
|
|
127
|
+
></zl-button>
|
|
128
|
+
{% endunless %}
|
|
129
|
+
{% endfor %}
|
|
130
|
+
|
|
131
|
+
{% assign passkey = actions | where: "name", "passkey" | first %}
|
|
132
|
+
{% if passkey %}
|
|
133
|
+
{% unless passkey.primary %}
|
|
134
|
+
<zl-button
|
|
135
|
+
hierarchy="secondary"
|
|
136
|
+
size="medium"
|
|
137
|
+
block
|
|
138
|
+
action="passkey"
|
|
139
|
+
data-testid="zitadel-action-passkey"
|
|
140
|
+
label="{{ passkey.text_key | t }}"
|
|
141
|
+
></zl-button>
|
|
142
|
+
{% endunless %}
|
|
143
|
+
{% endif %}
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
{% assign register = actions | where: "name", "register" | first %}
|
|
147
|
+
{% if register %}
|
|
148
|
+
<p class="zl-card-nav">
|
|
149
|
+
{{ 'identifier.action.register.lead' | t }}<a href="#" class="zl-card-nav__link" data-action="register" data-testid="zitadel-action-register-link">{{ 'identifier.action.register.link' | t }}</a>
|
|
150
|
+
</p>
|
|
151
|
+
{% endif %}
|
|
152
|
+
|
|
153
|
+
{% assign sign_in = actions | where: "name", "sign_in" | first %}
|
|
154
|
+
{% if sign_in %}
|
|
155
|
+
<p class="zl-card-nav">
|
|
156
|
+
{{ 'register.action.sign_in.lead' | t }}<a href="#" class="zl-card-nav__link" data-action="sign_in" data-testid="zitadel-action-sign_in-link">{{ 'register.action.sign_in.link' | t }}</a>
|
|
157
|
+
</p>
|
|
158
|
+
{% endif %}
|
|
159
|
+
|
|
160
|
+
{% if challenge %}
|
|
161
|
+
{% if challenge.method == "passkey" or challenge.method == "passkey_register" %}
|
|
162
|
+
{% assign ceremony = "authenticate" %}
|
|
163
|
+
{% assign submit_method = challenge.method %}
|
|
164
|
+
{% if challenge.method == "passkey_register" or challenge.options.user %}
|
|
165
|
+
{% assign ceremony = "register" %}
|
|
166
|
+
{% assign submit_method = "passkey_register" %}
|
|
167
|
+
{% endif %}
|
|
168
|
+
<zl-passkey
|
|
169
|
+
ceremony="{{ ceremony }}"
|
|
170
|
+
method="{{ submit_method }}"
|
|
171
|
+
challenge-id="{{ challenge.challenge_id }}"
|
|
172
|
+
options='{{ challenge.options | json }}'
|
|
173
|
+
pending-label="{{ 'passkey.pending.status' | t }}"
|
|
174
|
+
cancel-label="{{ 'action.cancel' | t }}"
|
|
175
|
+
></zl-passkey>
|
|
176
|
+
{% endif %}
|
|
177
|
+
{% endif %}
|
|
178
|
+
|
|
179
|
+
{% mandatory_gates %}
|
|
180
|
+
</zl-card>
|
|
181
|
+
</section>
|
|
182
|
+
</div>
|
|
183
|
+
</zl-page-shell>
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
<zl-page-shell data-zl-template-root>
|
|
2
|
+
<div class="zl-split zl-split--right">
|
|
3
|
+
<aside class="zl-split__brand">
|
|
4
|
+
{% if branding.logo_url %}
|
|
5
|
+
<img class="zl-split__logo" src="{{ branding.logo_url }}" alt="" />
|
|
6
|
+
{% endif %}
|
|
7
|
+
{% if branding.hero_url %}
|
|
8
|
+
<img class="zl-split__hero" src="{{ branding.hero_url }}" alt="" />
|
|
9
|
+
{% endif %}
|
|
10
|
+
{% unless branding.logo_url or branding.hero_url %}
|
|
11
|
+
{% comment %} Until branding.json names an asset, a decorative panel
|
|
12
|
+
keeps the split composition readable. {% endcomment %}
|
|
13
|
+
<div class="zl-split__placeholder" aria-hidden="true"></div>
|
|
14
|
+
{% endunless %}
|
|
15
|
+
</aside>
|
|
16
|
+
<section class="zl-split__form">
|
|
17
|
+
{% if branding.logo_url %}
|
|
18
|
+
<img class="zl-split__compact" src="{{ branding.logo_url }}" alt="" />
|
|
19
|
+
{% elsif branding.hero_url %}
|
|
20
|
+
<img class="zl-split__compact zl-split__compact--hero" src="{{ branding.hero_url }}" alt="" />
|
|
21
|
+
{% endif %}
|
|
22
|
+
<zl-card>
|
|
23
|
+
<h1 slot="header" class="zl-card-title">{{ step.texts.title_key | t: identity.display_name }}</h1>
|
|
24
|
+
{% if step.texts.description_key %}
|
|
25
|
+
{% assign card_subtitle = step.texts.description_key | t: identity.display_name %}
|
|
26
|
+
{% if card_subtitle != "" %}
|
|
27
|
+
<p slot="header" class="zl-card-subtitle">{{ card_subtitle }}</p>
|
|
28
|
+
{% endif %}
|
|
29
|
+
{% endif %}
|
|
30
|
+
|
|
31
|
+
{% if errors and errors.size > 0 %}
|
|
32
|
+
{% for err in errors %}
|
|
33
|
+
{% if err | formLevelError %}
|
|
34
|
+
{% assign alert_heading = err.text_key | alertHeading %}
|
|
35
|
+
{% assign alert_body = err.text_key | alertBody %}
|
|
36
|
+
<zl-alert severity="error" dismissible data-zl-step-error{% if alert_heading != "" %} heading="{{ alert_heading | t }}"{% endif %}>
|
|
37
|
+
{% if alert_body != "" %}{{ alert_body | t }}{% elsif err.text_key %}{{ err.text_key | t }}{% else %}{{ err.message }}{% endif %}
|
|
38
|
+
</zl-alert>
|
|
39
|
+
{% endif %}
|
|
40
|
+
{% endfor %}
|
|
41
|
+
{% endif %}
|
|
42
|
+
|
|
43
|
+
{% for f in fields %}
|
|
44
|
+
{% assign field_placeholder = f.text_key | fieldPlaceholder %}
|
|
45
|
+
{% assign field_help = f.text_key | fieldHelp %}
|
|
46
|
+
{% assign field_err = f.name | fieldError: errors %}
|
|
47
|
+
{% case f.type %}
|
|
48
|
+
{% when 'checkbox' %}
|
|
49
|
+
<zl-checkbox
|
|
50
|
+
name="{{ f.name }}"
|
|
51
|
+
data-testid="zitadel-field-{{ f.name | testid }}"
|
|
52
|
+
label="{{ f.text_key | t }}"
|
|
53
|
+
value="true"
|
|
54
|
+
{% if f.value %}checked{% endif %}
|
|
55
|
+
{% if field_err != "" %}invalid error="{{ field_err }}"{% endif %}
|
|
56
|
+
></zl-checkbox>
|
|
57
|
+
{% when 'select' %}
|
|
58
|
+
<zl-select
|
|
59
|
+
name="{{ f.name }}"
|
|
60
|
+
data-testid="zitadel-field-{{ f.name | testid }}"
|
|
61
|
+
label="{{ f.text_key | t }}"
|
|
62
|
+
value="{{ f.value }}"
|
|
63
|
+
options='{{ f.validation.enum | selectOptions | json }}'
|
|
64
|
+
{% if f.required %}required{% endif %}
|
|
65
|
+
{% if field_placeholder != "" %}placeholder="{{ field_placeholder }}"{% endif %}
|
|
66
|
+
{% if field_err != "" %}invalid error="{{ field_err }}"{% endif %}
|
|
67
|
+
></zl-select>
|
|
68
|
+
{% else %}
|
|
69
|
+
{% assign autocomplete_val = '' %}
|
|
70
|
+
{% if f.name == 'email' %}
|
|
71
|
+
{% assign autocomplete_val = 'email' %}
|
|
72
|
+
{% elsif f.type == 'password' and step.name contains 'register' %}
|
|
73
|
+
{% assign autocomplete_val = 'new-password' %}
|
|
74
|
+
{% elsif f.type == 'password' %}
|
|
75
|
+
{% assign autocomplete_val = 'current-password' %}
|
|
76
|
+
{% endif %}
|
|
77
|
+
<zl-field
|
|
78
|
+
name="{{ f.name }}"
|
|
79
|
+
data-testid="zitadel-field-{{ f.name | testid }}"
|
|
80
|
+
label="{{ f.text_key | t }}"
|
|
81
|
+
type="{{ f.type }}"
|
|
82
|
+
value="{{ f.value }}"
|
|
83
|
+
{% if autocomplete_val != '' %}autocomplete="{{ autocomplete_val }}"{% endif %}
|
|
84
|
+
{% if f.required %}required{% endif %}
|
|
85
|
+
{% if field_placeholder != "" %}placeholder="{{ field_placeholder }}"{% endif %}
|
|
86
|
+
{% if field_err != "" %}invalid error="{{ field_err }}"{% endif %}
|
|
87
|
+
>
|
|
88
|
+
{% if field_help != "" %}
|
|
89
|
+
<span slot="help">{{ field_help }}</span>
|
|
90
|
+
{% endif %}
|
|
91
|
+
</zl-field>
|
|
92
|
+
{% endcase %}
|
|
93
|
+
{% endfor %}
|
|
94
|
+
|
|
95
|
+
{% assign recover = actions | where: "name", "recover" | first %}
|
|
96
|
+
{% if recover %}
|
|
97
|
+
<p class="zl-card-forgot">
|
|
98
|
+
<a href="#" class="zl-card-forgot__link" data-action="recover">{{ recover.text_key | t }}</a>
|
|
99
|
+
</p>
|
|
100
|
+
{% endif %}
|
|
101
|
+
|
|
102
|
+
{% for a in actions %}
|
|
103
|
+
{% if a.primary %}
|
|
104
|
+
<zl-button
|
|
105
|
+
hierarchy="primary"
|
|
106
|
+
size="medium"
|
|
107
|
+
type="submit"
|
|
108
|
+
block
|
|
109
|
+
action="{{ a.name }}"
|
|
110
|
+
data-testid="zitadel-action-{{ a.name }}"
|
|
111
|
+
label="{{ a.text_key | t }}"
|
|
112
|
+
{% if loading %}loading{% endif %}
|
|
113
|
+
></zl-button>
|
|
114
|
+
{% endif %}
|
|
115
|
+
{% endfor %}
|
|
116
|
+
|
|
117
|
+
{% for a in actions %}
|
|
118
|
+
{% unless a.primary or a.kind == 'back' or a.name == 'passkey' or a.name == 'register' or a.name == 'sign_in' or a.name == 'recover' %}
|
|
119
|
+
<zl-button
|
|
120
|
+
hierarchy="secondary"
|
|
121
|
+
size="medium"
|
|
122
|
+
type="button"
|
|
123
|
+
block
|
|
124
|
+
action="{{ a.name }}"
|
|
125
|
+
data-testid="zitadel-action-{{ a.name }}"
|
|
126
|
+
label="{{ a.text_key | t }}"
|
|
127
|
+
></zl-button>
|
|
128
|
+
{% endunless %}
|
|
129
|
+
{% endfor %}
|
|
130
|
+
|
|
131
|
+
{% assign passkey = actions | where: "name", "passkey" | first %}
|
|
132
|
+
{% if passkey %}
|
|
133
|
+
{% unless passkey.primary %}
|
|
134
|
+
<zl-button
|
|
135
|
+
hierarchy="secondary"
|
|
136
|
+
size="medium"
|
|
137
|
+
block
|
|
138
|
+
action="passkey"
|
|
139
|
+
data-testid="zitadel-action-passkey"
|
|
140
|
+
label="{{ passkey.text_key | t }}"
|
|
141
|
+
></zl-button>
|
|
142
|
+
{% endunless %}
|
|
143
|
+
{% endif %}
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
{% assign register = actions | where: "name", "register" | first %}
|
|
147
|
+
{% if register %}
|
|
148
|
+
<p class="zl-card-nav">
|
|
149
|
+
{{ 'identifier.action.register.lead' | t }}<a href="#" class="zl-card-nav__link" data-action="register" data-testid="zitadel-action-register-link">{{ 'identifier.action.register.link' | t }}</a>
|
|
150
|
+
</p>
|
|
151
|
+
{% endif %}
|
|
152
|
+
|
|
153
|
+
{% assign sign_in = actions | where: "name", "sign_in" | first %}
|
|
154
|
+
{% if sign_in %}
|
|
155
|
+
<p class="zl-card-nav">
|
|
156
|
+
{{ 'register.action.sign_in.lead' | t }}<a href="#" class="zl-card-nav__link" data-action="sign_in" data-testid="zitadel-action-sign_in-link">{{ 'register.action.sign_in.link' | t }}</a>
|
|
157
|
+
</p>
|
|
158
|
+
{% endif %}
|
|
159
|
+
|
|
160
|
+
{% if challenge %}
|
|
161
|
+
{% if challenge.method == "passkey" or challenge.method == "passkey_register" %}
|
|
162
|
+
{% assign ceremony = "authenticate" %}
|
|
163
|
+
{% assign submit_method = challenge.method %}
|
|
164
|
+
{% if challenge.method == "passkey_register" or challenge.options.user %}
|
|
165
|
+
{% assign ceremony = "register" %}
|
|
166
|
+
{% assign submit_method = "passkey_register" %}
|
|
167
|
+
{% endif %}
|
|
168
|
+
<zl-passkey
|
|
169
|
+
ceremony="{{ ceremony }}"
|
|
170
|
+
method="{{ submit_method }}"
|
|
171
|
+
challenge-id="{{ challenge.challenge_id }}"
|
|
172
|
+
options='{{ challenge.options | json }}'
|
|
173
|
+
pending-label="{{ 'passkey.pending.status' | t }}"
|
|
174
|
+
cancel-label="{{ 'action.cancel' | t }}"
|
|
175
|
+
></zl-passkey>
|
|
176
|
+
{% endif %}
|
|
177
|
+
{% endif %}
|
|
178
|
+
|
|
179
|
+
{% mandatory_gates %}
|
|
180
|
+
</zl-card>
|
|
181
|
+
</section>
|
|
182
|
+
</div>
|
|
183
|
+
</zl-page-shell>
|
|
@@ -9,12 +9,10 @@
|
|
|
9
9
|
"description": "The default editable schema for human users.",
|
|
10
10
|
"x-auth-methods": {
|
|
11
11
|
"password": {
|
|
12
|
-
"enabled": true
|
|
13
|
-
"position": 1
|
|
12
|
+
"enabled": true
|
|
14
13
|
},
|
|
15
14
|
"passkey": {
|
|
16
|
-
"enabled": true
|
|
17
|
-
"position": 2
|
|
15
|
+
"enabled": true
|
|
18
16
|
}
|
|
19
17
|
},
|
|
20
18
|
"required": [
|
|
@@ -26,21 +24,6 @@
|
|
|
26
24
|
"format": "email",
|
|
27
25
|
"x-unique": "project",
|
|
28
26
|
"description": "The user's email address."
|
|
29
|
-
},
|
|
30
|
-
"givenName": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"maxLength": 50,
|
|
33
|
-
"description": "The user's given (first) name."
|
|
34
|
-
},
|
|
35
|
-
"familyName": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"maxLength": 50,
|
|
38
|
-
"description": "The user's family (last) name."
|
|
39
|
-
},
|
|
40
|
-
"dateOfBirth": {
|
|
41
|
-
"type": "string",
|
|
42
|
-
"format": "date",
|
|
43
|
-
"description": "The user's date of birth (ISO 8601, YYYY-MM-DD)."
|
|
44
27
|
}
|
|
45
28
|
}
|
|
46
29
|
}
|
|
@@ -25,6 +25,12 @@
|
|
|
25
25
|
"kind": "passkey",
|
|
26
26
|
"primary": false,
|
|
27
27
|
"text_key": "identifier.action.passkey"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "register",
|
|
31
|
+
"kind": "navigate",
|
|
32
|
+
"primary": false,
|
|
33
|
+
"text_key": "identifier.action.register.link"
|
|
28
34
|
}
|
|
29
35
|
],
|
|
30
36
|
"transitions": {
|
|
@@ -36,6 +42,10 @@
|
|
|
36
42
|
},
|
|
37
43
|
"user_not_found": {
|
|
38
44
|
"target": "register"
|
|
45
|
+
},
|
|
46
|
+
"register": {
|
|
47
|
+
"target": "register",
|
|
48
|
+
"purpose": "register"
|
|
39
49
|
}
|
|
40
50
|
}
|
|
41
51
|
},
|
|
@@ -70,10 +80,7 @@
|
|
|
70
80
|
{
|
|
71
81
|
"name": "register",
|
|
72
82
|
"fields": [
|
|
73
|
-
"email"
|
|
74
|
-
"givenName",
|
|
75
|
-
"familyName",
|
|
76
|
-
"dateOfBirth"
|
|
83
|
+
"email"
|
|
77
84
|
],
|
|
78
85
|
"actions": [
|
|
79
86
|
{
|
|
@@ -87,6 +94,12 @@
|
|
|
87
94
|
"kind": "passkey_register",
|
|
88
95
|
"primary": false,
|
|
89
96
|
"text_key": "register.action.passkey"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "sign_in",
|
|
100
|
+
"kind": "navigate",
|
|
101
|
+
"primary": false,
|
|
102
|
+
"text_key": "register.action.sign_in.link"
|
|
90
103
|
}
|
|
91
104
|
],
|
|
92
105
|
"transitions": {
|
|
@@ -98,6 +111,10 @@
|
|
|
98
111
|
},
|
|
99
112
|
"user_already_exists": {
|
|
100
113
|
"target": "password"
|
|
114
|
+
},
|
|
115
|
+
"sign_in": {
|
|
116
|
+
"target": "identifier",
|
|
117
|
+
"purpose": "login"
|
|
101
118
|
}
|
|
102
119
|
}
|
|
103
120
|
},
|
|
@@ -9,12 +9,10 @@
|
|
|
9
9
|
"description": "The default editable schema for human users (passkey-first sign-in).",
|
|
10
10
|
"x-auth-methods": {
|
|
11
11
|
"passkey": {
|
|
12
|
-
"enabled": true
|
|
13
|
-
"position": 1
|
|
12
|
+
"enabled": true
|
|
14
13
|
},
|
|
15
14
|
"password": {
|
|
16
|
-
"enabled": true
|
|
17
|
-
"position": 2
|
|
15
|
+
"enabled": true
|
|
18
16
|
}
|
|
19
17
|
},
|
|
20
18
|
"required": [
|
|
@@ -26,21 +24,6 @@
|
|
|
26
24
|
"format": "email",
|
|
27
25
|
"x-unique": "project",
|
|
28
26
|
"description": "The user's email address."
|
|
29
|
-
},
|
|
30
|
-
"givenName": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"maxLength": 50,
|
|
33
|
-
"description": "The user's given (first) name."
|
|
34
|
-
},
|
|
35
|
-
"familyName": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"maxLength": 50,
|
|
38
|
-
"description": "The user's family (last) name."
|
|
39
|
-
},
|
|
40
|
-
"dateOfBirth": {
|
|
41
|
-
"type": "string",
|
|
42
|
-
"format": "date",
|
|
43
|
-
"description": "The user's date of birth (ISO 8601, YYYY-MM-DD)."
|
|
44
27
|
}
|
|
45
28
|
}
|
|
46
29
|
}
|