@leancodepl/kratos 7.7.0 → 7.8.1
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/index.cjs.js +243 -99
- package/index.esm.js +244 -100
- package/package.json +3 -3
- package/src/lib/cards/userSettingsCard.d.ts +2 -2
- package/src/lib/defaultComponents/DefaultLinkComponent/index.d.ts +1 -1
- package/src/lib/sections/identifierFirstLoginSection.d.ts +8 -0
- package/src/lib/sections/passkeySettingsSection.d.ts +8 -0
- package/src/lib/sections/profileLoginSection.d.ts +8 -0
- package/src/lib/sections/profileRegistrationSection.d.ts +8 -0
- package/src/lib/types/components.d.ts +3 -0
- package/src/lib/utils/helpers.d.ts +4 -1
- package/src/lib/sections/webAuthnSettingsSection.d.ts +0 -8
package/index.cjs.js
CHANGED
|
@@ -829,7 +829,10 @@ var defaultComponents = {
|
|
|
829
829
|
WebAuthnSettingsSectionWrapper: "div",
|
|
830
830
|
LookupSecretSettingsSectionWrapper: "div",
|
|
831
831
|
OidcSettingsSectionWrapper: "div",
|
|
832
|
-
TotpSettingsSectionWrapper: "div"
|
|
832
|
+
TotpSettingsSectionWrapper: "div",
|
|
833
|
+
IdentifierFirstLoginSectionWrapper: "div",
|
|
834
|
+
ProfileLoginSectionWrapper: "div",
|
|
835
|
+
ProfileRegistrationSectionWrapper: "div"
|
|
833
836
|
};
|
|
834
837
|
|
|
835
838
|
function _define_property$d(obj, key, value) {
|
|
@@ -2523,17 +2526,17 @@ function getNodeInputType(attr) {
|
|
|
2523
2526
|
if (!groups && !attributes && !excludeAttributes) return true;
|
|
2524
2527
|
var g = search(groups);
|
|
2525
2528
|
if (!withoutDefaultGroup) {
|
|
2526
|
-
g.push(
|
|
2529
|
+
g.push(client.UiNodeGroupEnum.Default);
|
|
2527
2530
|
}
|
|
2528
2531
|
// filter the attributes
|
|
2529
2532
|
var a = search(attributes);
|
|
2530
2533
|
if (!withoutDefaultAttributes) {
|
|
2531
2534
|
// always add hidden fields e.g. csrf
|
|
2532
|
-
if (group.includes(
|
|
2535
|
+
if (group.includes(client.UiNodeGroupEnum.Default)) {
|
|
2533
2536
|
a.push("hidden");
|
|
2534
2537
|
}
|
|
2535
2538
|
// automatically add the necessary fields for webauthn and totp
|
|
2536
|
-
if (group.includes(
|
|
2539
|
+
if (group.includes(client.UiNodeGroupEnum.Webauthn) || group.includes(client.UiNodeGroupEnum.Totp)) {
|
|
2537
2540
|
a.push("input", "script");
|
|
2538
2541
|
}
|
|
2539
2542
|
}
|
|
@@ -2626,7 +2629,7 @@ function Node(param) {
|
|
|
2626
2629
|
case "submit":
|
|
2627
2630
|
{
|
|
2628
2631
|
var _node_meta_label;
|
|
2629
|
-
var isSocial = (attrs.name === "provider" || attrs.name === "link") && node.group ===
|
|
2632
|
+
var isSocial = (attrs.name === "provider" || attrs.name === "link") && node.group === client.UiNodeGroupEnum.Oidc;
|
|
2630
2633
|
var submit = {
|
|
2631
2634
|
type: attrs.type,
|
|
2632
2635
|
name: attrs.name
|
|
@@ -2840,7 +2843,7 @@ function useScriptNodes(param) {
|
|
|
2840
2843
|
}
|
|
2841
2844
|
var scriptNodes = filterNodesByGroups({
|
|
2842
2845
|
nodes: nodes,
|
|
2843
|
-
groups:
|
|
2846
|
+
groups: client.UiNodeGroupEnum.Webauthn,
|
|
2844
2847
|
attributes: "text/javascript",
|
|
2845
2848
|
withoutDefaultGroup: true,
|
|
2846
2849
|
withoutDefaultAttributes: true
|
|
@@ -3000,7 +3003,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
3000
3003
|
includeCSRF: true,
|
|
3001
3004
|
filter: formFilterOverride !== null && formFilterOverride !== void 0 ? formFilterOverride : {
|
|
3002
3005
|
nodes: flow.ui.nodes,
|
|
3003
|
-
groups:
|
|
3006
|
+
groups: client.UiNodeGroupEnum.Default,
|
|
3004
3007
|
attributes: "hidden"
|
|
3005
3008
|
}
|
|
3006
3009
|
}),
|
|
@@ -3012,37 +3015,55 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
3012
3015
|
function hasOidc(nodes) {
|
|
3013
3016
|
return nodes.some(function(param) {
|
|
3014
3017
|
var group = param.group;
|
|
3015
|
-
return group ===
|
|
3018
|
+
return group === client.UiNodeGroupEnum.Oidc;
|
|
3016
3019
|
});
|
|
3017
3020
|
}
|
|
3018
3021
|
function hasPassword(nodes) {
|
|
3019
3022
|
return nodes.some(function(param) {
|
|
3020
3023
|
var group = param.group;
|
|
3021
|
-
return group ===
|
|
3024
|
+
return group === client.UiNodeGroupEnum.Password;
|
|
3022
3025
|
});
|
|
3023
3026
|
}
|
|
3024
|
-
function
|
|
3027
|
+
function hasDefault(nodes) {
|
|
3025
3028
|
return nodes.some(function(param) {
|
|
3026
3029
|
var group = param.group;
|
|
3027
|
-
return group ===
|
|
3030
|
+
return group === client.UiNodeGroupEnum.Default;
|
|
3031
|
+
});
|
|
3032
|
+
}
|
|
3033
|
+
function hasProfile(nodes) {
|
|
3034
|
+
return nodes.some(function(param) {
|
|
3035
|
+
var group = param.group;
|
|
3036
|
+
return group === client.UiNodeGroupEnum.Profile;
|
|
3037
|
+
});
|
|
3038
|
+
}
|
|
3039
|
+
function hasPasskey(nodes) {
|
|
3040
|
+
return nodes.some(function(param) {
|
|
3041
|
+
var group = param.group;
|
|
3042
|
+
return group === client.UiNodeGroupEnum.Passkey;
|
|
3043
|
+
});
|
|
3044
|
+
}
|
|
3045
|
+
function hasIdentifierFirst(nodes) {
|
|
3046
|
+
return nodes.some(function(param) {
|
|
3047
|
+
var group = param.group;
|
|
3048
|
+
return group === client.UiNodeGroupEnum.IdentifierFirst;
|
|
3028
3049
|
});
|
|
3029
3050
|
}
|
|
3030
3051
|
function hasLookupSecret(nodes) {
|
|
3031
3052
|
return nodes.some(function(param) {
|
|
3032
3053
|
var group = param.group;
|
|
3033
|
-
return group ===
|
|
3054
|
+
return group === client.UiNodeGroupEnum.LookupSecret;
|
|
3034
3055
|
});
|
|
3035
3056
|
}
|
|
3036
3057
|
function hasTotp(nodes) {
|
|
3037
3058
|
return nodes.some(function(param) {
|
|
3038
3059
|
var group = param.group;
|
|
3039
|
-
return group ===
|
|
3060
|
+
return group === client.UiNodeGroupEnum.Totp;
|
|
3040
3061
|
});
|
|
3041
3062
|
}
|
|
3042
3063
|
function hasCode(nodes) {
|
|
3043
3064
|
return nodes.some(function(param) {
|
|
3044
3065
|
var group = param.group;
|
|
3045
|
-
return group ===
|
|
3066
|
+
return group === client.UiNodeGroupEnum.Code;
|
|
3046
3067
|
});
|
|
3047
3068
|
}
|
|
3048
3069
|
|
|
@@ -3059,9 +3080,7 @@ function hasCode(nodes) {
|
|
|
3059
3080
|
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3060
3081
|
filter: {
|
|
3061
3082
|
nodes: nodes,
|
|
3062
|
-
groups:
|
|
3063
|
-
"code"
|
|
3064
|
-
],
|
|
3083
|
+
groups: client.UiNodeGroupEnum.Code,
|
|
3065
3084
|
// we don't want to map the default group twice
|
|
3066
3085
|
// the form already maps hidden fields under the default group
|
|
3067
3086
|
// we are only interested in hidden fields that are under the code group
|
|
@@ -3075,7 +3094,7 @@ function hasCode(nodes) {
|
|
|
3075
3094
|
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3076
3095
|
filter: {
|
|
3077
3096
|
nodes: nodes,
|
|
3078
|
-
groups:
|
|
3097
|
+
groups: client.UiNodeGroupEnum.Code,
|
|
3079
3098
|
withoutDefaultAttributes: true,
|
|
3080
3099
|
excludeAttributes: [
|
|
3081
3100
|
"hidden",
|
|
@@ -3087,7 +3106,7 @@ function hasCode(nodes) {
|
|
|
3087
3106
|
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3088
3107
|
filter: {
|
|
3089
3108
|
nodes: nodes,
|
|
3090
|
-
groups:
|
|
3109
|
+
groups: client.UiNodeGroupEnum.Code,
|
|
3091
3110
|
withoutDefaultAttributes: true,
|
|
3092
3111
|
attributes: [
|
|
3093
3112
|
"button",
|
|
@@ -3099,6 +3118,34 @@ function hasCode(nodes) {
|
|
|
3099
3118
|
});
|
|
3100
3119
|
}
|
|
3101
3120
|
|
|
3121
|
+
function IdentifierFirstLoginSection(param) {
|
|
3122
|
+
var nodes = param.nodes, IdentifierFirstLoginSectionWrapper = param.IdentifierFirstLoginSectionWrapper;
|
|
3123
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(IdentifierFirstLoginSectionWrapper, {
|
|
3124
|
+
children: [
|
|
3125
|
+
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3126
|
+
filter: {
|
|
3127
|
+
nodes: nodes,
|
|
3128
|
+
groups: [
|
|
3129
|
+
client.UiNodeGroupEnum.Default,
|
|
3130
|
+
client.UiNodeGroupEnum.IdentifierFirst
|
|
3131
|
+
],
|
|
3132
|
+
excludeAttributes: [
|
|
3133
|
+
"submit",
|
|
3134
|
+
"hidden"
|
|
3135
|
+
]
|
|
3136
|
+
}
|
|
3137
|
+
}),
|
|
3138
|
+
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3139
|
+
filter: {
|
|
3140
|
+
nodes: nodes,
|
|
3141
|
+
groups: client.UiNodeGroupEnum.IdentifierFirst,
|
|
3142
|
+
attributes: "submit"
|
|
3143
|
+
}
|
|
3144
|
+
})
|
|
3145
|
+
]
|
|
3146
|
+
});
|
|
3147
|
+
}
|
|
3148
|
+
|
|
3102
3149
|
/**
|
|
3103
3150
|
* LinkSection renders the fields for recovery and verification
|
|
3104
3151
|
* Please see the Ory docs for more information:
|
|
@@ -3112,8 +3159,8 @@ function hasCode(nodes) {
|
|
|
3112
3159
|
filter: {
|
|
3113
3160
|
nodes: nodes,
|
|
3114
3161
|
groups: [
|
|
3115
|
-
|
|
3116
|
-
|
|
3162
|
+
client.UiNodeGroupEnum.Link,
|
|
3163
|
+
client.UiNodeGroupEnum.Code
|
|
3117
3164
|
],
|
|
3118
3165
|
excludeAttributes: "submit"
|
|
3119
3166
|
}
|
|
@@ -3122,8 +3169,8 @@ function hasCode(nodes) {
|
|
|
3122
3169
|
filter: {
|
|
3123
3170
|
nodes: nodes,
|
|
3124
3171
|
groups: [
|
|
3125
|
-
|
|
3126
|
-
|
|
3172
|
+
client.UiNodeGroupEnum.Link,
|
|
3173
|
+
client.UiNodeGroupEnum.Code
|
|
3127
3174
|
],
|
|
3128
3175
|
attributes: "submit"
|
|
3129
3176
|
}
|
|
@@ -3141,8 +3188,8 @@ function LoginSection(param) {
|
|
|
3141
3188
|
filter: {
|
|
3142
3189
|
nodes: nodes,
|
|
3143
3190
|
groups: [
|
|
3144
|
-
|
|
3145
|
-
|
|
3191
|
+
client.UiNodeGroupEnum.Default,
|
|
3192
|
+
client.UiNodeGroupEnum.Password
|
|
3146
3193
|
],
|
|
3147
3194
|
excludeAttributes: [
|
|
3148
3195
|
"submit",
|
|
@@ -3153,9 +3200,7 @@ function LoginSection(param) {
|
|
|
3153
3200
|
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3154
3201
|
filter: {
|
|
3155
3202
|
nodes: nodes,
|
|
3156
|
-
groups:
|
|
3157
|
-
"password"
|
|
3158
|
-
],
|
|
3203
|
+
groups: client.UiNodeGroupEnum.Password,
|
|
3159
3204
|
attributes: "submit"
|
|
3160
3205
|
}
|
|
3161
3206
|
})
|
|
@@ -3168,7 +3213,7 @@ function OidcSection(param) {
|
|
|
3168
3213
|
if (!hasOidc(flow.ui.nodes)) return null;
|
|
3169
3214
|
var hasOidcTraits = filterNodesByGroups({
|
|
3170
3215
|
nodes: flow.ui.nodes,
|
|
3171
|
-
groups:
|
|
3216
|
+
groups: client.UiNodeGroupEnum.Oidc,
|
|
3172
3217
|
withoutDefaultGroup: true,
|
|
3173
3218
|
excludeAttributes: "submit"
|
|
3174
3219
|
}).length > 0;
|
|
@@ -3177,7 +3222,7 @@ function OidcSection(param) {
|
|
|
3177
3222
|
hasOidcTraits && /*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3178
3223
|
filter: {
|
|
3179
3224
|
nodes: flow.ui.nodes,
|
|
3180
|
-
groups:
|
|
3225
|
+
groups: client.UiNodeGroupEnum.Oidc,
|
|
3181
3226
|
withoutDefaultGroup: true,
|
|
3182
3227
|
excludeAttributes: "submit"
|
|
3183
3228
|
}
|
|
@@ -3185,7 +3230,7 @@ function OidcSection(param) {
|
|
|
3185
3230
|
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3186
3231
|
filter: {
|
|
3187
3232
|
nodes: flow.ui.nodes,
|
|
3188
|
-
groups:
|
|
3233
|
+
groups: client.UiNodeGroupEnum.Oidc,
|
|
3189
3234
|
attributes: "submit"
|
|
3190
3235
|
}
|
|
3191
3236
|
})
|
|
@@ -3247,19 +3292,27 @@ function _object_spread_props$6(target, source) {
|
|
|
3247
3292
|
}
|
|
3248
3293
|
function PasswordlessSection(param) {
|
|
3249
3294
|
var flow = param.flow, PasswordlessSectionWrapper = param.PasswordlessSectionWrapper;
|
|
3250
|
-
if (!
|
|
3295
|
+
if (!hasPasskey(flow.ui.nodes)) return null;
|
|
3251
3296
|
var filter = {
|
|
3252
3297
|
nodes: flow.ui.nodes,
|
|
3253
|
-
groups:
|
|
3254
|
-
"webauthn"
|
|
3255
|
-
],
|
|
3298
|
+
groups: client.UiNodeGroupEnum.Passkey,
|
|
3256
3299
|
withoutDefaultAttributes: true
|
|
3257
3300
|
};
|
|
3258
3301
|
return /*#__PURE__*/ jsxRuntime.jsxs(PasswordlessSectionWrapper, {
|
|
3259
3302
|
children: [
|
|
3260
3303
|
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3261
3304
|
filter: _object_spread_props$6(_object_spread$7({}, filter), {
|
|
3262
|
-
|
|
3305
|
+
groups: [
|
|
3306
|
+
"identifier_first",
|
|
3307
|
+
"passkey"
|
|
3308
|
+
],
|
|
3309
|
+
attributes: [
|
|
3310
|
+
"hidden"
|
|
3311
|
+
]
|
|
3312
|
+
})
|
|
3313
|
+
}),
|
|
3314
|
+
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3315
|
+
filter: _object_spread_props$6(_object_spread$7({}, filter), {
|
|
3263
3316
|
excludeAttributes: [
|
|
3264
3317
|
"hidden",
|
|
3265
3318
|
"button",
|
|
@@ -3272,6 +3325,9 @@ function PasswordlessSection(param) {
|
|
|
3272
3325
|
attributes: [
|
|
3273
3326
|
"button",
|
|
3274
3327
|
"submit"
|
|
3328
|
+
],
|
|
3329
|
+
excludeAttributes: [
|
|
3330
|
+
"hidden"
|
|
3275
3331
|
]
|
|
3276
3332
|
})
|
|
3277
3333
|
})
|
|
@@ -3279,6 +3335,52 @@ function PasswordlessSection(param) {
|
|
|
3279
3335
|
});
|
|
3280
3336
|
}
|
|
3281
3337
|
|
|
3338
|
+
function ProfileLoginSection(param) {
|
|
3339
|
+
var nodes = param.nodes, ProfileLoginSectionWrapper = param.ProfileLoginSectionWrapper;
|
|
3340
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(ProfileLoginSectionWrapper, {
|
|
3341
|
+
children: [
|
|
3342
|
+
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3343
|
+
filter: {
|
|
3344
|
+
nodes: nodes,
|
|
3345
|
+
groups: client.UiNodeGroupEnum.Profile,
|
|
3346
|
+
excludeAttributes: "submit,hidden"
|
|
3347
|
+
}
|
|
3348
|
+
}),
|
|
3349
|
+
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3350
|
+
filter: {
|
|
3351
|
+
nodes: nodes,
|
|
3352
|
+
groups: client.UiNodeGroupEnum.Profile,
|
|
3353
|
+
excludeAttributes: "hidden",
|
|
3354
|
+
attributes: "submit"
|
|
3355
|
+
}
|
|
3356
|
+
})
|
|
3357
|
+
]
|
|
3358
|
+
});
|
|
3359
|
+
}
|
|
3360
|
+
|
|
3361
|
+
function ProfileRegistrationSection(param) {
|
|
3362
|
+
var nodes = param.nodes, ProfileRegistrationSectionWrapper = param.ProfileRegistrationSectionWrapper;
|
|
3363
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(ProfileRegistrationSectionWrapper, {
|
|
3364
|
+
children: [
|
|
3365
|
+
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3366
|
+
filter: {
|
|
3367
|
+
nodes: nodes,
|
|
3368
|
+
groups: client.UiNodeGroupEnum.Profile,
|
|
3369
|
+
excludeAttributes: "submit,hidden"
|
|
3370
|
+
}
|
|
3371
|
+
}),
|
|
3372
|
+
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3373
|
+
filter: {
|
|
3374
|
+
nodes: nodes,
|
|
3375
|
+
groups: client.UiNodeGroupEnum.Profile,
|
|
3376
|
+
excludeAttributes: "hidden",
|
|
3377
|
+
attributes: "submit"
|
|
3378
|
+
}
|
|
3379
|
+
})
|
|
3380
|
+
]
|
|
3381
|
+
});
|
|
3382
|
+
}
|
|
3383
|
+
|
|
3282
3384
|
function _define_property$6(obj, key, value) {
|
|
3283
3385
|
if (key in obj) {
|
|
3284
3386
|
Object.defineProperty(obj, key, {
|
|
@@ -3336,19 +3438,18 @@ function RegistrationSection(param) {
|
|
|
3336
3438
|
if (!hasPassword(nodes)) return null;
|
|
3337
3439
|
var filter = {
|
|
3338
3440
|
nodes: nodes,
|
|
3339
|
-
groups:
|
|
3340
|
-
"password"
|
|
3341
|
-
]
|
|
3441
|
+
groups: client.UiNodeGroupEnum.Password
|
|
3342
3442
|
};
|
|
3343
3443
|
return /*#__PURE__*/ jsxRuntime.jsxs(RegistrationSectionWrapper, {
|
|
3344
3444
|
children: [
|
|
3345
3445
|
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3346
3446
|
filter: _object_spread_props$5(_object_spread$6({}, filter), {
|
|
3347
|
-
excludeAttributes: "submit"
|
|
3447
|
+
excludeAttributes: "submit,hidden"
|
|
3348
3448
|
})
|
|
3349
3449
|
}),
|
|
3350
3450
|
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3351
3451
|
filter: _object_spread_props$5(_object_spread$6({}, filter), {
|
|
3452
|
+
excludeAttributes: "hidden",
|
|
3352
3453
|
attributes: "submit"
|
|
3353
3454
|
})
|
|
3354
3455
|
})
|
|
@@ -3409,7 +3510,7 @@ function _object_spread$5(target) {
|
|
|
3409
3510
|
* @returns JSX.Element
|
|
3410
3511
|
*/ function UserAuthCard(param) {
|
|
3411
3512
|
var flow = param.flow, flowType = param.flowType, onSubmit = param.onSubmit, className = param.className;
|
|
3412
|
-
var _useKratosContext = useKratosContext(), _useKratosContext_components = _useKratosContext.components, PasswordlessSectionWrapper = _useKratosContext_components.PasswordlessSectionWrapper, OidcSectionWrapper = _useKratosContext_components.OidcSectionWrapper, AuthCodeSectionWrapper = _useKratosContext_components.AuthCodeSectionWrapper, LoginSectionWrapper = _useKratosContext_components.LoginSectionWrapper, RegistrationSectionWrapper = _useKratosContext_components.RegistrationSectionWrapper, UiMessages = _useKratosContext_components.UiMessages, LinkSectionWrapper = _useKratosContext_components.LinkSectionWrapper, excludeScripts = _useKratosContext.excludeScripts;
|
|
3513
|
+
var _useKratosContext = useKratosContext(), _useKratosContext_components = _useKratosContext.components, PasswordlessSectionWrapper = _useKratosContext_components.PasswordlessSectionWrapper, OidcSectionWrapper = _useKratosContext_components.OidcSectionWrapper, AuthCodeSectionWrapper = _useKratosContext_components.AuthCodeSectionWrapper, LoginSectionWrapper = _useKratosContext_components.LoginSectionWrapper, RegistrationSectionWrapper = _useKratosContext_components.RegistrationSectionWrapper, UiMessages = _useKratosContext_components.UiMessages, LinkSectionWrapper = _useKratosContext_components.LinkSectionWrapper, IdentifierFirstLoginSectionWrapper = _useKratosContext_components.IdentifierFirstLoginSectionWrapper, ProfileLoginSectionWrapper = _useKratosContext_components.ProfileLoginSectionWrapper, ProfileRegistrationSectionWrapper = _useKratosContext_components.ProfileRegistrationSectionWrapper, excludeScripts = _useKratosContext.excludeScripts;
|
|
3413
3514
|
useScriptNodes({
|
|
3414
3515
|
nodes: flow.ui.nodes,
|
|
3415
3516
|
excludeScripts: excludeScripts
|
|
@@ -3417,17 +3518,19 @@ function _object_spread$5(target) {
|
|
|
3417
3518
|
var $flow = undefined;
|
|
3418
3519
|
var $oidc = undefined;
|
|
3419
3520
|
var $code = undefined;
|
|
3420
|
-
var $
|
|
3521
|
+
var $passkey = undefined;
|
|
3522
|
+
var $twoStep = undefined;
|
|
3523
|
+
var $profile = undefined;
|
|
3421
3524
|
// the current flow is a two factor flow if the user is logged in and has any of the second factor methods enabled.
|
|
3422
|
-
var isTwoFactor = flowType === "login" && isLoggedIn(flow) && (hasTotp(flow.ui.nodes) ||
|
|
3525
|
+
var isTwoFactor = flowType === "login" && isLoggedIn(flow) && (hasTotp(flow.ui.nodes) || hasPasskey(flow.ui.nodes) || hasLookupSecret(flow.ui.nodes));
|
|
3423
3526
|
// This array contains all the 2fa flows mapped to their own respective forms.
|
|
3424
3527
|
var twoFactorFlows = isTwoFactor && [
|
|
3425
|
-
|
|
3528
|
+
hasPasskey(flow.ui.nodes) && /*#__PURE__*/ jsxRuntime.jsx(UserAuthForm, {
|
|
3426
3529
|
flow: flow,
|
|
3427
3530
|
children: /*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3428
3531
|
filter: {
|
|
3429
3532
|
nodes: flow.ui.nodes,
|
|
3430
|
-
groups:
|
|
3533
|
+
groups: client.UiNodeGroupEnum.Passkey,
|
|
3431
3534
|
withoutDefaultGroup: true
|
|
3432
3535
|
}
|
|
3433
3536
|
})
|
|
@@ -3437,7 +3540,17 @@ function _object_spread$5(target) {
|
|
|
3437
3540
|
children: /*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3438
3541
|
filter: {
|
|
3439
3542
|
nodes: flow.ui.nodes,
|
|
3440
|
-
groups:
|
|
3543
|
+
groups: client.UiNodeGroupEnum.Password,
|
|
3544
|
+
withoutDefaultGroup: true
|
|
3545
|
+
}
|
|
3546
|
+
})
|
|
3547
|
+
}),
|
|
3548
|
+
hasProfile(flow.ui.nodes) && /*#__PURE__*/ jsxRuntime.jsx(UserAuthForm, {
|
|
3549
|
+
flow: flow,
|
|
3550
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3551
|
+
filter: {
|
|
3552
|
+
nodes: flow.ui.nodes,
|
|
3553
|
+
groups: client.UiNodeGroupEnum.Profile,
|
|
3441
3554
|
withoutDefaultGroup: true
|
|
3442
3555
|
}
|
|
3443
3556
|
})
|
|
@@ -3450,7 +3563,7 @@ function _object_spread$5(target) {
|
|
|
3450
3563
|
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3451
3564
|
filter: {
|
|
3452
3565
|
nodes: flow.ui.nodes,
|
|
3453
|
-
groups:
|
|
3566
|
+
groups: client.UiNodeGroupEnum.Totp,
|
|
3454
3567
|
withoutDefaultGroup: true,
|
|
3455
3568
|
excludeAttributes: "submit"
|
|
3456
3569
|
}
|
|
@@ -3458,7 +3571,7 @@ function _object_spread$5(target) {
|
|
|
3458
3571
|
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3459
3572
|
filter: {
|
|
3460
3573
|
nodes: flow.ui.nodes,
|
|
3461
|
-
groups:
|
|
3574
|
+
groups: client.UiNodeGroupEnum.Totp,
|
|
3462
3575
|
withoutDefaultGroup: true,
|
|
3463
3576
|
attributes: "submit"
|
|
3464
3577
|
}
|
|
@@ -3472,7 +3585,7 @@ function _object_spread$5(target) {
|
|
|
3472
3585
|
children: /*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3473
3586
|
filter: {
|
|
3474
3587
|
nodes: flow.ui.nodes,
|
|
3475
|
-
groups:
|
|
3588
|
+
groups: client.UiNodeGroupEnum.LookupSecret,
|
|
3476
3589
|
withoutDefaultGroup: true
|
|
3477
3590
|
}
|
|
3478
3591
|
})
|
|
@@ -3481,28 +3594,40 @@ function _object_spread$5(target) {
|
|
|
3481
3594
|
;
|
|
3482
3595
|
switch(flowType){
|
|
3483
3596
|
case "login":
|
|
3484
|
-
$passwordless = hasWebauthn(flow.ui.nodes) ? /*#__PURE__*/ jsxRuntime.jsx(PasswordlessSection, {
|
|
3485
|
-
flow: flow,
|
|
3486
|
-
PasswordlessSectionWrapper: PasswordlessSectionWrapper
|
|
3487
|
-
}) : undefined;
|
|
3488
3597
|
$oidc = hasOidc(flow.ui.nodes) ? /*#__PURE__*/ jsxRuntime.jsx(OidcSection, {
|
|
3489
3598
|
flow: flow,
|
|
3490
3599
|
OidcSectionWrapper: OidcSectionWrapper
|
|
3491
3600
|
}) : undefined;
|
|
3492
|
-
$
|
|
3493
|
-
|
|
3601
|
+
$passkey = hasPasskey(flow.ui.nodes) ? /*#__PURE__*/ jsxRuntime.jsx(PasswordlessSection, {
|
|
3602
|
+
flow: flow,
|
|
3603
|
+
PasswordlessSectionWrapper: PasswordlessSectionWrapper
|
|
3604
|
+
}) : undefined;
|
|
3605
|
+
$twoStep = hasIdentifierFirst(flow.ui.nodes) ? /*#__PURE__*/ jsxRuntime.jsx(IdentifierFirstLoginSection, {
|
|
3606
|
+
IdentifierFirstLoginSectionWrapper: IdentifierFirstLoginSectionWrapper,
|
|
3494
3607
|
nodes: flow.ui.nodes
|
|
3495
3608
|
}) : undefined;
|
|
3609
|
+
$profile = hasProfile(flow.ui.nodes) ? /*#__PURE__*/ jsxRuntime.jsx(ProfileLoginSection, {
|
|
3610
|
+
nodes: flow.ui.nodes,
|
|
3611
|
+
ProfileLoginSectionWrapper: ProfileLoginSectionWrapper
|
|
3612
|
+
}) : undefined;
|
|
3496
3613
|
$flow = hasPassword(flow.ui.nodes) ? /*#__PURE__*/ jsxRuntime.jsx(LoginSection, {
|
|
3497
3614
|
LoginSectionWrapper: LoginSectionWrapper,
|
|
3498
3615
|
nodes: flow.ui.nodes
|
|
3499
3616
|
}) : undefined;
|
|
3617
|
+
$code = hasCode(flow.ui.nodes) ? /*#__PURE__*/ jsxRuntime.jsx(AuthCodeSection, {
|
|
3618
|
+
AuthCodeSectionWrapper: AuthCodeSectionWrapper,
|
|
3619
|
+
nodes: flow.ui.nodes
|
|
3620
|
+
}) : undefined;
|
|
3500
3621
|
break;
|
|
3501
3622
|
case "registration":
|
|
3502
|
-
$
|
|
3623
|
+
$passkey = hasPasskey(flow.ui.nodes) ? /*#__PURE__*/ jsxRuntime.jsx(PasswordlessSection, {
|
|
3503
3624
|
flow: flow,
|
|
3504
3625
|
PasswordlessSectionWrapper: PasswordlessSectionWrapper
|
|
3505
3626
|
}) : undefined;
|
|
3627
|
+
$profile = hasProfile(flow.ui.nodes) ? /*#__PURE__*/ jsxRuntime.jsx(ProfileRegistrationSection, {
|
|
3628
|
+
nodes: flow.ui.nodes,
|
|
3629
|
+
ProfileRegistrationSectionWrapper: ProfileRegistrationSectionWrapper
|
|
3630
|
+
}) : undefined;
|
|
3506
3631
|
$oidc = hasOidc(flow.ui.nodes) ? /*#__PURE__*/ jsxRuntime.jsx(OidcSection, {
|
|
3507
3632
|
flow: flow,
|
|
3508
3633
|
OidcSectionWrapper: OidcSectionWrapper
|
|
@@ -3511,7 +3636,7 @@ function _object_spread$5(target) {
|
|
|
3511
3636
|
AuthCodeSectionWrapper: AuthCodeSectionWrapper,
|
|
3512
3637
|
nodes: flow.ui.nodes
|
|
3513
3638
|
}) : undefined;
|
|
3514
|
-
$flow = hasPassword(flow.ui.nodes) ? /*#__PURE__*/ jsxRuntime.jsx(RegistrationSection, {
|
|
3639
|
+
$flow = hasDefault(flow.ui.nodes) || hasPassword(flow.ui.nodes) ? /*#__PURE__*/ jsxRuntime.jsx(RegistrationSection, {
|
|
3515
3640
|
nodes: flow.ui.nodes,
|
|
3516
3641
|
RegistrationSectionWrapper: RegistrationSectionWrapper
|
|
3517
3642
|
}) : undefined;
|
|
@@ -3525,9 +3650,8 @@ function _object_spread$5(target) {
|
|
|
3525
3650
|
});
|
|
3526
3651
|
break;
|
|
3527
3652
|
}
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
var canShowPasswordless = !!$passwordless && (!isLoggedIn(flow) || flowType === "registration");
|
|
3653
|
+
var canShowPasskey = !!$passkey && (!isLoggedIn(flow) || flowType === "registration");
|
|
3654
|
+
var canShowProfile = !!$profile && hasProfile(flow.ui.nodes);
|
|
3531
3655
|
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
3532
3656
|
className: className,
|
|
3533
3657
|
children: [
|
|
@@ -3538,6 +3662,16 @@ function _object_spread$5(target) {
|
|
|
3538
3662
|
flow: flow,
|
|
3539
3663
|
children: $oidc
|
|
3540
3664
|
}),
|
|
3665
|
+
$twoStep && /*#__PURE__*/ jsxRuntime.jsx(UserAuthForm, {
|
|
3666
|
+
flow: flow,
|
|
3667
|
+
children: $twoStep
|
|
3668
|
+
}),
|
|
3669
|
+
canShowPasskey && /*#__PURE__*/ jsxRuntime.jsx(UserAuthForm, {
|
|
3670
|
+
submitOnEnter: true,
|
|
3671
|
+
flow: flow,
|
|
3672
|
+
onSubmit: onSubmit,
|
|
3673
|
+
children: $passkey
|
|
3674
|
+
}),
|
|
3541
3675
|
$code && /*#__PURE__*/ jsxRuntime.jsx(UserAuthForm, {
|
|
3542
3676
|
flow: flow,
|
|
3543
3677
|
children: $code
|
|
@@ -3548,16 +3682,26 @@ function _object_spread$5(target) {
|
|
|
3548
3682
|
onSubmit: onSubmit,
|
|
3549
3683
|
children: $flow
|
|
3550
3684
|
}),
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3685
|
+
isTwoFactor && /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3686
|
+
children: [
|
|
3687
|
+
/*#__PURE__*/ jsxRuntime.jsx(NodeMessages, {
|
|
3688
|
+
nodes: filterNodesByGroups({
|
|
3689
|
+
nodes: flow.ui.nodes,
|
|
3690
|
+
groups: [
|
|
3691
|
+
client.UiNodeGroupEnum.Password,
|
|
3692
|
+
client.UiNodeGroupEnum.Webauthn,
|
|
3693
|
+
client.UiNodeGroupEnum.Passkey,
|
|
3694
|
+
client.UiNodeGroupEnum.Totp,
|
|
3695
|
+
client.UiNodeGroupEnum.LookupSecret
|
|
3696
|
+
]
|
|
3697
|
+
})
|
|
3698
|
+
}),
|
|
3699
|
+
twoFactorFlows
|
|
3700
|
+
]
|
|
3701
|
+
}),
|
|
3702
|
+
canShowProfile && /*#__PURE__*/ jsxRuntime.jsx(UserAuthForm, {
|
|
3554
3703
|
flow: flow,
|
|
3555
|
-
|
|
3556
|
-
nodes: flow.ui.nodes,
|
|
3557
|
-
attributes: "hidden"
|
|
3558
|
-
},
|
|
3559
|
-
onSubmit: onSubmit,
|
|
3560
|
-
children: $passwordless
|
|
3704
|
+
children: $profile
|
|
3561
3705
|
})
|
|
3562
3706
|
]
|
|
3563
3707
|
});
|
|
@@ -3640,7 +3784,7 @@ function LookupSecretSettingsSection(param) {
|
|
|
3640
3784
|
var flow = param.flow, LookupSecretSettingsSectionWrapper = param.LookupSecretSettingsSectionWrapper;
|
|
3641
3785
|
var filter = {
|
|
3642
3786
|
nodes: flow.ui.nodes,
|
|
3643
|
-
groups:
|
|
3787
|
+
groups: client.UiNodeGroupEnum.LookupSecret,
|
|
3644
3788
|
withoutDefaultGroup: true
|
|
3645
3789
|
};
|
|
3646
3790
|
if (!hasLookupSecret(flow.ui.nodes)) return null;
|
|
@@ -3667,7 +3811,7 @@ function OidcSettingsSection(param) {
|
|
|
3667
3811
|
children: /*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3668
3812
|
filter: {
|
|
3669
3813
|
nodes: flow.ui.nodes,
|
|
3670
|
-
groups:
|
|
3814
|
+
groups: client.UiNodeGroupEnum.Oidc,
|
|
3671
3815
|
withoutDefaultGroup: true
|
|
3672
3816
|
}
|
|
3673
3817
|
})
|
|
@@ -3726,15 +3870,15 @@ function _object_spread_props$3(target, source) {
|
|
|
3726
3870
|
}
|
|
3727
3871
|
return target;
|
|
3728
3872
|
}
|
|
3729
|
-
function
|
|
3730
|
-
var flow = param.flow,
|
|
3731
|
-
if (!
|
|
3873
|
+
function PasskeySettingsSection(param) {
|
|
3874
|
+
var flow = param.flow, PasskeySettingsSectionWrapper = param.PasskeySettingsSectionWrapper;
|
|
3875
|
+
if (!hasPasskey(flow.ui.nodes)) return null;
|
|
3732
3876
|
var filter = {
|
|
3733
3877
|
nodes: flow.ui.nodes,
|
|
3734
|
-
groups:
|
|
3878
|
+
groups: client.UiNodeGroupEnum.Passkey,
|
|
3735
3879
|
withoutDefaultGroup: true
|
|
3736
3880
|
};
|
|
3737
|
-
return /*#__PURE__*/ jsxRuntime.jsxs(
|
|
3881
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(PasskeySettingsSectionWrapper, {
|
|
3738
3882
|
children: [
|
|
3739
3883
|
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3740
3884
|
filter: _object_spread_props$3(_object_spread$3({}, filter), {
|
|
@@ -3802,13 +3946,15 @@ function _object_spread_props$2(target, source) {
|
|
|
3802
3946
|
}
|
|
3803
3947
|
return target;
|
|
3804
3948
|
}
|
|
3805
|
-
function
|
|
3806
|
-
var flow = param.flow,
|
|
3949
|
+
function PasswordSettingsSection(param) {
|
|
3950
|
+
var flow = param.flow, PasswordSettingsSectionWrapper = param.PasswordSettingsSectionWrapper;
|
|
3951
|
+
if (!hasPassword(flow.ui.nodes)) return null;
|
|
3807
3952
|
var filter = {
|
|
3808
3953
|
nodes: flow.ui.nodes,
|
|
3809
|
-
groups:
|
|
3954
|
+
groups: client.UiNodeGroupEnum.Password,
|
|
3955
|
+
withoutDefaultGroup: true
|
|
3810
3956
|
};
|
|
3811
|
-
return /*#__PURE__*/ jsxRuntime.jsxs(
|
|
3957
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(PasswordSettingsSectionWrapper, {
|
|
3812
3958
|
children: [
|
|
3813
3959
|
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3814
3960
|
filter: _object_spread_props$2(_object_spread$2({}, filter), {
|
|
@@ -3876,15 +4022,13 @@ function _object_spread_props$1(target, source) {
|
|
|
3876
4022
|
}
|
|
3877
4023
|
return target;
|
|
3878
4024
|
}
|
|
3879
|
-
function
|
|
3880
|
-
var flow = param.flow,
|
|
3881
|
-
if (!hasTotp(flow.ui.nodes)) return null;
|
|
4025
|
+
function ProfileSettingsSection(param) {
|
|
4026
|
+
var flow = param.flow, ProfileSettingsSectionWrapper = param.ProfileSettingsSectionWrapper;
|
|
3882
4027
|
var filter = {
|
|
3883
4028
|
nodes: flow.ui.nodes,
|
|
3884
|
-
groups:
|
|
3885
|
-
withoutDefaultGroup: true
|
|
4029
|
+
groups: client.UiNodeGroupEnum.Profile
|
|
3886
4030
|
};
|
|
3887
|
-
return /*#__PURE__*/ jsxRuntime.jsxs(
|
|
4031
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(ProfileSettingsSectionWrapper, {
|
|
3888
4032
|
children: [
|
|
3889
4033
|
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3890
4034
|
filter: _object_spread_props$1(_object_spread$1({}, filter), {
|
|
@@ -3952,15 +4096,15 @@ function _object_spread_props(target, source) {
|
|
|
3952
4096
|
}
|
|
3953
4097
|
return target;
|
|
3954
4098
|
}
|
|
3955
|
-
function
|
|
3956
|
-
var flow = param.flow,
|
|
3957
|
-
if (!
|
|
4099
|
+
function TotpSettingsSection(param) {
|
|
4100
|
+
var flow = param.flow, TotpSettingsSectionWrapper = param.TotpSettingsSectionWrapper;
|
|
4101
|
+
if (!hasTotp(flow.ui.nodes)) return null;
|
|
3958
4102
|
var filter = {
|
|
3959
4103
|
nodes: flow.ui.nodes,
|
|
3960
|
-
groups:
|
|
4104
|
+
groups: client.UiNodeGroupEnum.Totp,
|
|
3961
4105
|
withoutDefaultGroup: true
|
|
3962
4106
|
};
|
|
3963
|
-
return /*#__PURE__*/ jsxRuntime.jsxs(
|
|
4107
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(TotpSettingsSectionWrapper, {
|
|
3964
4108
|
children: [
|
|
3965
4109
|
/*#__PURE__*/ jsxRuntime.jsx(FilterFlowNodes, {
|
|
3966
4110
|
filter: _object_spread_props(_object_spread({}, filter), {
|
|
@@ -3984,32 +4128,32 @@ function UserSettingsCard(param) {
|
|
|
3984
4128
|
excludeScripts: excludeScripts
|
|
3985
4129
|
});
|
|
3986
4130
|
var $flow = function() {
|
|
3987
|
-
if (flowType ===
|
|
4131
|
+
if (flowType === client.UiNodeGroupEnum.Profile) {
|
|
3988
4132
|
return /*#__PURE__*/ jsxRuntime.jsx(ProfileSettingsSection, {
|
|
3989
4133
|
flow: flow,
|
|
3990
4134
|
ProfileSettingsSectionWrapper: ProfileSettingsSectionWrapper
|
|
3991
4135
|
});
|
|
3992
|
-
} else if (flowType ===
|
|
4136
|
+
} else if (flowType === client.UiNodeGroupEnum.Password && hasPassword(flow.ui.nodes)) {
|
|
3993
4137
|
return /*#__PURE__*/ jsxRuntime.jsx(PasswordSettingsSection, {
|
|
3994
4138
|
flow: flow,
|
|
3995
4139
|
PasswordSettingsSectionWrapper: PasswordSettingsSectionWrapper
|
|
3996
4140
|
});
|
|
3997
|
-
} else if (flowType ===
|
|
3998
|
-
return /*#__PURE__*/ jsxRuntime.jsx(
|
|
4141
|
+
} else if (flowType === client.UiNodeGroupEnum.Passkey && hasPasskey(flow.ui.nodes)) {
|
|
4142
|
+
return /*#__PURE__*/ jsxRuntime.jsx(PasskeySettingsSection, {
|
|
3999
4143
|
flow: flow,
|
|
4000
|
-
|
|
4144
|
+
PasskeySettingsSectionWrapper: WebAuthnSettingsSectionWrapper
|
|
4001
4145
|
});
|
|
4002
|
-
} else if (flowType ===
|
|
4146
|
+
} else if (flowType === client.UiNodeGroupEnum.LookupSecret && hasLookupSecret(flow.ui.nodes)) {
|
|
4003
4147
|
return /*#__PURE__*/ jsxRuntime.jsx(LookupSecretSettingsSection, {
|
|
4004
4148
|
flow: flow,
|
|
4005
4149
|
LookupSecretSettingsSectionWrapper: LookupSecretSettingsSectionWrapper
|
|
4006
4150
|
});
|
|
4007
|
-
} else if (flowType ===
|
|
4151
|
+
} else if (flowType === client.UiNodeGroupEnum.Oidc && hasOidc(flow.ui.nodes)) {
|
|
4008
4152
|
return /*#__PURE__*/ jsxRuntime.jsx(OidcSettingsSection, {
|
|
4009
4153
|
flow: flow,
|
|
4010
4154
|
OidcSettingsSectionWrapper: OidcSettingsSectionWrapper
|
|
4011
4155
|
});
|
|
4012
|
-
} else if (flowType ===
|
|
4156
|
+
} else if (flowType === client.UiNodeGroupEnum.Totp && hasTotp(flow.ui.nodes)) {
|
|
4013
4157
|
return /*#__PURE__*/ jsxRuntime.jsx(TotpSettingsSection, {
|
|
4014
4158
|
flow: flow,
|
|
4015
4159
|
TotpSettingsSectionWrapper: TotpSettingsSectionWrapper
|