@logto/schemas 1.25.0 → 1.26.0
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/alterations/1.26.0-1740982044-add-one-time-tokens-table.ts +36 -0
- package/alterations/1.26.0-1741240284-add-captcha-policy.ts +20 -0
- package/alterations/1.26.0-1741318144-add-one-time-token-unique-index.ts +18 -0
- package/alterations/1.26.0-1741572426-add-captcha-providers.ts +34 -0
- package/alterations-js/1.26.0-1740982044-add-one-time-tokens-table.js +30 -0
- package/alterations-js/1.26.0-1741240284-add-captcha-policy.js +16 -0
- package/alterations-js/1.26.0-1741318144-add-one-time-token-unique-index.js +14 -0
- package/alterations-js/1.26.0-1741572426-add-captcha-providers.js +29 -0
- package/lib/consts/experience.d.ts +2 -0
- package/lib/consts/experience.js +2 -0
- package/lib/consts/oidc.d.ts +9 -1
- package/lib/consts/oidc.js +5 -0
- package/lib/db-entries/captcha-provider.d.ts +22 -0
- package/lib/db-entries/captcha-provider.js +38 -0
- package/lib/db-entries/index.d.ts +2 -0
- package/lib/db-entries/index.js +2 -0
- package/lib/db-entries/one-time-token.d.ts +28 -0
- package/lib/db-entries/one-time-token.js +50 -0
- package/lib/db-entries/sign-in-experience.d.ts +4 -2
- package/lib/db-entries/sign-in-experience.js +5 -1
- package/lib/foundations/jsonb-types/captcha.d.ts +63 -0
- package/lib/foundations/jsonb-types/captcha.js +21 -0
- package/lib/foundations/jsonb-types/index.d.ts +2 -0
- package/lib/foundations/jsonb-types/index.js +2 -0
- package/lib/foundations/jsonb-types/one-time-tokens.d.ts +18 -0
- package/lib/foundations/jsonb-types/one-time-tokens.js +14 -0
- package/lib/foundations/jsonb-types/saml-application-configs.d.ts +1 -1
- package/lib/foundations/jsonb-types/sentinel.d.ts +8 -1
- package/lib/foundations/jsonb-types/sentinel.js +7 -0
- package/lib/foundations/jsonb-types/sign-in-experience.d.ts +122 -5
- package/lib/foundations/jsonb-types/sign-in-experience.js +22 -0
- package/lib/foundations/jsonb-types/verification-records.d.ts +2 -1
- package/lib/foundations/jsonb-types/verification-records.js +1 -0
- package/lib/types/connector.d.ts +35 -3
- package/lib/types/interactions.d.ts +56 -3
- package/lib/types/interactions.js +10 -0
- package/lib/types/logto-config/jwt-customizer.d.ts +23 -23
- package/lib/types/saml-application.d.ts +9 -9
- package/lib/types/sign-in-experience.d.ts +75 -43
- package/lib/types/sign-in-experience.js +7 -0
- package/lib/types/sso-connector.d.ts +2 -2
- package/lib/types/system.d.ts +2 -2
- package/package.json +2 -2
- package/tables/captcha_providers.sql +13 -0
- package/tables/one_time_tokens.sql +18 -0
- package/tables/sign_in_experiences.sql +1 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ConnectorMetadata, type GoogleOneTapConfig } from '@logto/connector-kit';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { type SignInExperience } from '../db-entries/index.js';
|
|
4
|
+
import { CaptchaType } from '../foundations/jsonb-types/index.js';
|
|
4
5
|
import { type SsoConnectorMetadata } from './sso-connector.js';
|
|
5
6
|
type ForgotPassword = {
|
|
6
7
|
phone: boolean;
|
|
@@ -28,6 +29,10 @@ export type FullSignInExperience = SignInExperience & {
|
|
|
28
29
|
clientId: string;
|
|
29
30
|
connectorId: string;
|
|
30
31
|
};
|
|
32
|
+
captchaConfig?: {
|
|
33
|
+
type: CaptchaType;
|
|
34
|
+
siteKey: string;
|
|
35
|
+
};
|
|
31
36
|
};
|
|
32
37
|
export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendShape<{
|
|
33
38
|
tenantId: z.ZodType<string, z.ZodTypeDef, string>;
|
|
@@ -54,10 +59,10 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
54
59
|
}>;
|
|
55
60
|
languageInfo: z.ZodType<{
|
|
56
61
|
autoDetect: boolean;
|
|
57
|
-
fallbackLanguage: "af-ZA" | "am-ET" | "ar" | "ar-AR" | "as-IN" | "az-AZ" | "be-BY" | "bg-BG" | "bn-IN" | "br-FR" | "bs-BA" | "ca-ES" | "cb-IQ" | "co-FR" | "cs-CZ" | "cx-PH" | "cy-GB" | "da-DK" | "de" | "de-DE" | "el-GR" | "en" | "en-GB" | "en-US" | "eo-EO" | "es" | "es-ES" | "es-419" | "et-EE" | "eu-ES" | "fa-IR" | "ff-NG" | "fi-FI" | "fo-FO" | "fr" | "fr-CA" | "fr-FR" | "fy-NL" | "ga-IE" | "gl-ES" | "gn-PY" | "gu-IN" | "ha-NG" | "he-IL" | "hi-IN" | "hr-HR" | "ht-HT" | "hu-HU" | "hy-AM" | "id-ID" | "ik-US" | "is-IS" | "it" | "it-IT" | "iu-CA" | "ja" | "ja-JP" | "ja-KS" | "jv-ID" | "ka-GE" | "kk-KZ" | "km-KH" | "kn-IN" | "ko" | "ko-KR" | "ku-TR" | "ky-KG" | "lo-LA" | "lt-LT" | "lv-LV" | "mg-MG" | "mk-MK" | "ml-IN" | "mn-MN" | "mr-IN" | "ms-MY" | "mt-MT" | "my-MM" | "nb-NO" | "ne-NP" | "nl-BE" | "nl-NL" | "nn-NO" | "or-IN" | "pa-IN" | "pl-PL" | "ps-AF" | "pt" | "pt-BR" | "pt-PT" | "ro-RO" | "ru" | "ru-RU" | "rw-RW" | "sc-IT" | "si-LK" | "sk-SK" | "sl-SI" | "sn-ZW" | "sq-AL" | "sr-RS" | "sv-SE" | "sw-KE" | "sy-SY" | "sz-PL" | "ta-IN" | "te-IN" | "tg-TJ" | "th-TH" | "tl-PH" | "tr" | "tr-TR" | "tt-RU" | "tz-MA" | "uk-UA" | "ur-PK" | "uz-UZ" | "vi-VN" | "zh" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-TW" | "zz-TR";
|
|
62
|
+
fallbackLanguage: "af-ZA" | "am-ET" | "ar" | "ar-AR" | "as-IN" | "az-AZ" | "be-BY" | "bg-BG" | "bn-IN" | "br-FR" | "bs-BA" | "ca-ES" | "cb-IQ" | "co-FR" | "cs-CZ" | "cx-PH" | "cy-GB" | "da-DK" | "de" | "de-DE" | "el-GR" | "en" | "en-GB" | "en-US" | "eo-EO" | "es" | "es-ES" | "es-419" | "et-EE" | "eu-ES" | "fa-IR" | "ff-NG" | "fi" | "fi-FI" | "fo-FO" | "fr" | "fr-CA" | "fr-FR" | "fy-NL" | "ga-IE" | "gl-ES" | "gn-PY" | "gu-IN" | "ha-NG" | "he-IL" | "hi-IN" | "hr-HR" | "ht-HT" | "hu-HU" | "hy-AM" | "id-ID" | "ik-US" | "is-IS" | "it" | "it-IT" | "iu-CA" | "ja" | "ja-JP" | "ja-KS" | "jv-ID" | "ka-GE" | "kk-KZ" | "km-KH" | "kn-IN" | "ko" | "ko-KR" | "ku-TR" | "ky-KG" | "lo-LA" | "lt-LT" | "lv-LV" | "mg-MG" | "mk-MK" | "ml-IN" | "mn-MN" | "mr-IN" | "ms-MY" | "mt-MT" | "my-MM" | "nb-NO" | "ne-NP" | "nl" | "nl-BE" | "nl-NL" | "nn-NO" | "or-IN" | "pa-IN" | "pl-PL" | "ps-AF" | "pt" | "pt-BR" | "pt-PT" | "ro-RO" | "ru" | "ru-RU" | "rw-RW" | "sc-IT" | "si-LK" | "sk-SK" | "sl-SI" | "sn-ZW" | "sq-AL" | "sr-RS" | "sv" | "sv-SE" | "sw-KE" | "sy-SY" | "sz-PL" | "ta-IN" | "te-IN" | "tg-TJ" | "th" | "th-TH" | "tl-PH" | "tr" | "tr-TR" | "tt-RU" | "tz-MA" | "uk-UA" | "ur-PK" | "uz-UZ" | "vi-VN" | "zh" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-TW" | "zz-TR";
|
|
58
63
|
}, z.ZodTypeDef, {
|
|
59
64
|
autoDetect: boolean;
|
|
60
|
-
fallbackLanguage: "af-ZA" | "am-ET" | "ar" | "ar-AR" | "as-IN" | "az-AZ" | "be-BY" | "bg-BG" | "bn-IN" | "br-FR" | "bs-BA" | "ca-ES" | "cb-IQ" | "co-FR" | "cs-CZ" | "cx-PH" | "cy-GB" | "da-DK" | "de" | "de-DE" | "el-GR" | "en" | "en-GB" | "en-US" | "eo-EO" | "es" | "es-ES" | "es-419" | "et-EE" | "eu-ES" | "fa-IR" | "ff-NG" | "fi-FI" | "fo-FO" | "fr" | "fr-CA" | "fr-FR" | "fy-NL" | "ga-IE" | "gl-ES" | "gn-PY" | "gu-IN" | "ha-NG" | "he-IL" | "hi-IN" | "hr-HR" | "ht-HT" | "hu-HU" | "hy-AM" | "id-ID" | "ik-US" | "is-IS" | "it" | "it-IT" | "iu-CA" | "ja" | "ja-JP" | "ja-KS" | "jv-ID" | "ka-GE" | "kk-KZ" | "km-KH" | "kn-IN" | "ko" | "ko-KR" | "ku-TR" | "ky-KG" | "lo-LA" | "lt-LT" | "lv-LV" | "mg-MG" | "mk-MK" | "ml-IN" | "mn-MN" | "mr-IN" | "ms-MY" | "mt-MT" | "my-MM" | "nb-NO" | "ne-NP" | "nl-BE" | "nl-NL" | "nn-NO" | "or-IN" | "pa-IN" | "pl-PL" | "ps-AF" | "pt" | "pt-BR" | "pt-PT" | "ro-RO" | "ru" | "ru-RU" | "rw-RW" | "sc-IT" | "si-LK" | "sk-SK" | "sl-SI" | "sn-ZW" | "sq-AL" | "sr-RS" | "sv-SE" | "sw-KE" | "sy-SY" | "sz-PL" | "ta-IN" | "te-IN" | "tg-TJ" | "th-TH" | "tl-PH" | "tr" | "tr-TR" | "tt-RU" | "tz-MA" | "uk-UA" | "ur-PK" | "uz-UZ" | "vi-VN" | "zh" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-TW" | "zz-TR";
|
|
65
|
+
fallbackLanguage: "af-ZA" | "am-ET" | "ar" | "ar-AR" | "as-IN" | "az-AZ" | "be-BY" | "bg-BG" | "bn-IN" | "br-FR" | "bs-BA" | "ca-ES" | "cb-IQ" | "co-FR" | "cs-CZ" | "cx-PH" | "cy-GB" | "da-DK" | "de" | "de-DE" | "el-GR" | "en" | "en-GB" | "en-US" | "eo-EO" | "es" | "es-ES" | "es-419" | "et-EE" | "eu-ES" | "fa-IR" | "ff-NG" | "fi" | "fi-FI" | "fo-FO" | "fr" | "fr-CA" | "fr-FR" | "fy-NL" | "ga-IE" | "gl-ES" | "gn-PY" | "gu-IN" | "ha-NG" | "he-IL" | "hi-IN" | "hr-HR" | "ht-HT" | "hu-HU" | "hy-AM" | "id-ID" | "ik-US" | "is-IS" | "it" | "it-IT" | "iu-CA" | "ja" | "ja-JP" | "ja-KS" | "jv-ID" | "ka-GE" | "kk-KZ" | "km-KH" | "kn-IN" | "ko" | "ko-KR" | "ku-TR" | "ky-KG" | "lo-LA" | "lt-LT" | "lv-LV" | "mg-MG" | "mk-MK" | "ml-IN" | "mn-MN" | "mr-IN" | "ms-MY" | "mt-MT" | "my-MM" | "nb-NO" | "ne-NP" | "nl" | "nl-BE" | "nl-NL" | "nn-NO" | "or-IN" | "pa-IN" | "pl-PL" | "ps-AF" | "pt" | "pt-BR" | "pt-PT" | "ro-RO" | "ru" | "ru-RU" | "rw-RW" | "sc-IT" | "si-LK" | "sk-SK" | "sl-SI" | "sn-ZW" | "sq-AL" | "sr-RS" | "sv" | "sv-SE" | "sw-KE" | "sy-SY" | "sz-PL" | "ta-IN" | "te-IN" | "tg-TJ" | "th" | "th-TH" | "tl-PH" | "tr" | "tr-TR" | "tt-RU" | "tz-MA" | "uk-UA" | "ur-PK" | "uz-UZ" | "vi-VN" | "zh" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-TW" | "zz-TR";
|
|
61
66
|
}>;
|
|
62
67
|
termsOfUseUrl: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
63
68
|
privacyPolicyUrl: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
@@ -65,28 +70,20 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
65
70
|
signIn: z.ZodType<{
|
|
66
71
|
methods: {
|
|
67
72
|
password: boolean;
|
|
68
|
-
identifier: import("../
|
|
73
|
+
identifier: import("../foundations/jsonb-types/sign-in-experience.js").SignInIdentifier;
|
|
69
74
|
verificationCode: boolean;
|
|
70
75
|
isPasswordPrimary: boolean;
|
|
71
76
|
}[];
|
|
72
77
|
}, z.ZodTypeDef, {
|
|
73
78
|
methods: {
|
|
74
79
|
password: boolean;
|
|
75
|
-
identifier: import("../
|
|
80
|
+
identifier: import("../foundations/jsonb-types/sign-in-experience.js").SignInIdentifier;
|
|
76
81
|
verificationCode: boolean;
|
|
77
82
|
isPasswordPrimary: boolean;
|
|
78
83
|
}[];
|
|
79
84
|
}>;
|
|
80
|
-
signUp: z.ZodType<
|
|
81
|
-
|
|
82
|
-
password: boolean;
|
|
83
|
-
verify: boolean;
|
|
84
|
-
}, z.ZodTypeDef, {
|
|
85
|
-
identifiers: import("../index.js").SignInIdentifier[];
|
|
86
|
-
password: boolean;
|
|
87
|
-
verify: boolean;
|
|
88
|
-
}>;
|
|
89
|
-
socialSignIn: z.ZodType<import("../index.js").SocialSignIn, z.ZodTypeDef, import("../index.js").SocialSignIn>;
|
|
85
|
+
signUp: z.ZodType<import("../foundations/jsonb-types/sign-in-experience.js").SignUp, z.ZodTypeDef, import("../foundations/jsonb-types/sign-in-experience.js").SignUp>;
|
|
86
|
+
socialSignIn: z.ZodType<import("../foundations/jsonb-types/sign-in-experience.js").SocialSignIn, z.ZodTypeDef, import("../foundations/jsonb-types/sign-in-experience.js").SocialSignIn>;
|
|
90
87
|
socialSignInConnectorTargets: z.ZodType<string[], z.ZodTypeDef, string[]>;
|
|
91
88
|
signInMode: z.ZodType<import("../db-entries/custom-types.js").SignInMode, z.ZodTypeDef, import("../db-entries/custom-types.js").SignInMode>;
|
|
92
89
|
customCss: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
@@ -127,17 +124,16 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
127
124
|
words?: string[] | undefined;
|
|
128
125
|
} | undefined;
|
|
129
126
|
}>;
|
|
130
|
-
mfa: z.ZodType<
|
|
131
|
-
factors: import("../index.js").MfaFactor[];
|
|
132
|
-
policy: import("../index.js").MfaPolicy;
|
|
133
|
-
}, z.ZodTypeDef, {
|
|
134
|
-
factors: import("../index.js").MfaFactor[];
|
|
135
|
-
policy: import("../index.js").MfaPolicy;
|
|
136
|
-
}>;
|
|
127
|
+
mfa: z.ZodType<import("../foundations/jsonb-types/sign-in-experience.js").Mfa, z.ZodTypeDef, import("../foundations/jsonb-types/sign-in-experience.js").Mfa>;
|
|
137
128
|
singleSignOnEnabled: z.ZodType<boolean, z.ZodTypeDef, boolean>;
|
|
138
129
|
supportEmail: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
139
130
|
supportWebsiteUrl: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
140
131
|
unknownSessionRedirectUrl: z.ZodType<string | null, z.ZodTypeDef, string | null>;
|
|
132
|
+
captchaPolicy: z.ZodType<{
|
|
133
|
+
enabled?: boolean | undefined;
|
|
134
|
+
}, z.ZodTypeDef, {
|
|
135
|
+
enabled?: boolean | undefined;
|
|
136
|
+
}>;
|
|
141
137
|
}, {
|
|
142
138
|
socialConnectors: z.ZodArray<z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
143
139
|
id: z.ZodString;
|
|
@@ -364,6 +360,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
364
360
|
"eu-ES"?: string | undefined;
|
|
365
361
|
"fa-IR"?: string | undefined;
|
|
366
362
|
"ff-NG"?: string | undefined;
|
|
363
|
+
fi?: string | undefined;
|
|
367
364
|
"fi-FI"?: string | undefined;
|
|
368
365
|
"fo-FO"?: string | undefined;
|
|
369
366
|
fr?: string | undefined;
|
|
@@ -412,6 +409,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
412
409
|
"my-MM"?: string | undefined;
|
|
413
410
|
"nb-NO"?: string | undefined;
|
|
414
411
|
"ne-NP"?: string | undefined;
|
|
412
|
+
nl?: string | undefined;
|
|
415
413
|
"nl-BE"?: string | undefined;
|
|
416
414
|
"nl-NL"?: string | undefined;
|
|
417
415
|
"nn-NO"?: string | undefined;
|
|
@@ -433,6 +431,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
433
431
|
"sn-ZW"?: string | undefined;
|
|
434
432
|
"sq-AL"?: string | undefined;
|
|
435
433
|
"sr-RS"?: string | undefined;
|
|
434
|
+
sv?: string | undefined;
|
|
436
435
|
"sv-SE"?: string | undefined;
|
|
437
436
|
"sw-KE"?: string | undefined;
|
|
438
437
|
"sy-SY"?: string | undefined;
|
|
@@ -440,6 +439,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
440
439
|
"ta-IN"?: string | undefined;
|
|
441
440
|
"te-IN"?: string | undefined;
|
|
442
441
|
"tg-TJ"?: string | undefined;
|
|
442
|
+
th?: string | undefined;
|
|
443
443
|
"th-TH"?: string | undefined;
|
|
444
444
|
"tl-PH"?: string | undefined;
|
|
445
445
|
tr?: string | undefined;
|
|
@@ -499,6 +499,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
499
499
|
"eu-ES"?: string | undefined;
|
|
500
500
|
"fa-IR"?: string | undefined;
|
|
501
501
|
"ff-NG"?: string | undefined;
|
|
502
|
+
fi?: string | undefined;
|
|
502
503
|
"fi-FI"?: string | undefined;
|
|
503
504
|
"fo-FO"?: string | undefined;
|
|
504
505
|
fr?: string | undefined;
|
|
@@ -547,6 +548,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
547
548
|
"my-MM"?: string | undefined;
|
|
548
549
|
"nb-NO"?: string | undefined;
|
|
549
550
|
"ne-NP"?: string | undefined;
|
|
551
|
+
nl?: string | undefined;
|
|
550
552
|
"nl-BE"?: string | undefined;
|
|
551
553
|
"nl-NL"?: string | undefined;
|
|
552
554
|
"nn-NO"?: string | undefined;
|
|
@@ -568,6 +570,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
568
570
|
"sn-ZW"?: string | undefined;
|
|
569
571
|
"sq-AL"?: string | undefined;
|
|
570
572
|
"sr-RS"?: string | undefined;
|
|
573
|
+
sv?: string | undefined;
|
|
571
574
|
"sv-SE"?: string | undefined;
|
|
572
575
|
"sw-KE"?: string | undefined;
|
|
573
576
|
"sy-SY"?: string | undefined;
|
|
@@ -575,6 +578,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
575
578
|
"ta-IN"?: string | undefined;
|
|
576
579
|
"te-IN"?: string | undefined;
|
|
577
580
|
"tg-TJ"?: string | undefined;
|
|
581
|
+
th?: string | undefined;
|
|
578
582
|
"th-TH"?: string | undefined;
|
|
579
583
|
"tl-PH"?: string | undefined;
|
|
580
584
|
tr?: string | undefined;
|
|
@@ -650,29 +654,40 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
650
654
|
closeOnTapOutside?: boolean | undefined;
|
|
651
655
|
itpSupport?: boolean | undefined;
|
|
652
656
|
}>>;
|
|
657
|
+
captchaConfig: z.ZodOptional<z.ZodObject<{
|
|
658
|
+
type: z.ZodNativeEnum<typeof CaptchaType>;
|
|
659
|
+
siteKey: z.ZodString;
|
|
660
|
+
}, "strip", z.ZodTypeAny, {
|
|
661
|
+
type: CaptchaType;
|
|
662
|
+
siteKey: string;
|
|
663
|
+
}, {
|
|
664
|
+
type: CaptchaType;
|
|
665
|
+
siteKey: string;
|
|
666
|
+
}>>;
|
|
653
667
|
}>, "strip", z.ZodTypeAny, {
|
|
654
668
|
id: string;
|
|
655
669
|
tenantId: string;
|
|
656
|
-
color: import("../
|
|
657
|
-
branding: import("../
|
|
670
|
+
color: import("../foundations/jsonb-types/sign-in-experience.js").Color;
|
|
671
|
+
branding: import("../foundations/jsonb-types/sign-in-experience.js").Branding;
|
|
658
672
|
termsOfUseUrl: string | null;
|
|
659
673
|
privacyPolicyUrl: string | null;
|
|
660
|
-
languageInfo: import("../
|
|
674
|
+
languageInfo: import("../foundations/jsonb-types/sign-in-experience.js").LanguageInfo;
|
|
661
675
|
agreeToTermsPolicy: import("../db-entries/custom-types.js").AgreeToTermsPolicy;
|
|
662
|
-
signIn: import("../
|
|
663
|
-
signUp: import("../
|
|
664
|
-
socialSignIn: import("../
|
|
665
|
-
socialSignInConnectorTargets: import("../
|
|
676
|
+
signIn: import("../foundations/jsonb-types/sign-in-experience.js").SignIn;
|
|
677
|
+
signUp: import("../foundations/jsonb-types/sign-in-experience.js").SignUp;
|
|
678
|
+
socialSignIn: import("../foundations/jsonb-types/sign-in-experience.js").SocialSignIn;
|
|
679
|
+
socialSignInConnectorTargets: import("../foundations/jsonb-types/sign-in-experience.js").ConnectorTargets;
|
|
666
680
|
signInMode: import("../db-entries/custom-types.js").SignInMode;
|
|
667
681
|
customCss: string | null;
|
|
668
|
-
customContent: import("../
|
|
669
|
-
customUiAssets: import("../
|
|
670
|
-
passwordPolicy: import("../
|
|
671
|
-
mfa: import("../
|
|
682
|
+
customContent: import("../foundations/jsonb-types/sign-in-experience.js").CustomContent;
|
|
683
|
+
customUiAssets: import("../foundations/jsonb-types/sign-in-experience.js").CustomUiAssets | null;
|
|
684
|
+
passwordPolicy: import("../foundations/jsonb-types/logs.js").PartialPasswordPolicy;
|
|
685
|
+
mfa: import("../foundations/jsonb-types/sign-in-experience.js").Mfa;
|
|
672
686
|
singleSignOnEnabled: boolean;
|
|
673
687
|
supportEmail: string | null;
|
|
674
688
|
supportWebsiteUrl: string | null;
|
|
675
689
|
unknownSessionRedirectUrl: string | null;
|
|
690
|
+
captchaPolicy: import("../foundations/jsonb-types/sign-in-experience.js").CaptchaPolicy;
|
|
676
691
|
socialConnectors: {
|
|
677
692
|
name: {
|
|
678
693
|
en: string;
|
|
@@ -708,6 +723,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
708
723
|
"eu-ES"?: string | undefined;
|
|
709
724
|
"fa-IR"?: string | undefined;
|
|
710
725
|
"ff-NG"?: string | undefined;
|
|
726
|
+
fi?: string | undefined;
|
|
711
727
|
"fi-FI"?: string | undefined;
|
|
712
728
|
"fo-FO"?: string | undefined;
|
|
713
729
|
fr?: string | undefined;
|
|
@@ -756,6 +772,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
756
772
|
"my-MM"?: string | undefined;
|
|
757
773
|
"nb-NO"?: string | undefined;
|
|
758
774
|
"ne-NP"?: string | undefined;
|
|
775
|
+
nl?: string | undefined;
|
|
759
776
|
"nl-BE"?: string | undefined;
|
|
760
777
|
"nl-NL"?: string | undefined;
|
|
761
778
|
"nn-NO"?: string | undefined;
|
|
@@ -777,6 +794,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
777
794
|
"sn-ZW"?: string | undefined;
|
|
778
795
|
"sq-AL"?: string | undefined;
|
|
779
796
|
"sr-RS"?: string | undefined;
|
|
797
|
+
sv?: string | undefined;
|
|
780
798
|
"sv-SE"?: string | undefined;
|
|
781
799
|
"sw-KE"?: string | undefined;
|
|
782
800
|
"sy-SY"?: string | undefined;
|
|
@@ -784,6 +802,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
784
802
|
"ta-IN"?: string | undefined;
|
|
785
803
|
"te-IN"?: string | undefined;
|
|
786
804
|
"tg-TJ"?: string | undefined;
|
|
805
|
+
th?: string | undefined;
|
|
787
806
|
"th-TH"?: string | undefined;
|
|
788
807
|
"tl-PH"?: string | undefined;
|
|
789
808
|
tr?: string | undefined;
|
|
@@ -828,29 +847,34 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
828
847
|
closeOnTapOutside?: boolean | undefined;
|
|
829
848
|
itpSupport?: boolean | undefined;
|
|
830
849
|
} | undefined;
|
|
850
|
+
captchaConfig?: {
|
|
851
|
+
type: CaptchaType;
|
|
852
|
+
siteKey: string;
|
|
853
|
+
} | undefined;
|
|
831
854
|
}, {
|
|
832
855
|
id: string;
|
|
833
856
|
tenantId: string;
|
|
834
|
-
color: import("../
|
|
835
|
-
branding: import("../
|
|
857
|
+
color: import("../foundations/jsonb-types/sign-in-experience.js").Color;
|
|
858
|
+
branding: import("../foundations/jsonb-types/sign-in-experience.js").Branding;
|
|
836
859
|
termsOfUseUrl: string | null;
|
|
837
860
|
privacyPolicyUrl: string | null;
|
|
838
|
-
languageInfo: import("../
|
|
861
|
+
languageInfo: import("../foundations/jsonb-types/sign-in-experience.js").LanguageInfo;
|
|
839
862
|
agreeToTermsPolicy: import("../db-entries/custom-types.js").AgreeToTermsPolicy;
|
|
840
|
-
signIn: import("../
|
|
841
|
-
signUp: import("../
|
|
842
|
-
socialSignIn: import("../
|
|
843
|
-
socialSignInConnectorTargets: import("../
|
|
863
|
+
signIn: import("../foundations/jsonb-types/sign-in-experience.js").SignIn;
|
|
864
|
+
signUp: import("../foundations/jsonb-types/sign-in-experience.js").SignUp;
|
|
865
|
+
socialSignIn: import("../foundations/jsonb-types/sign-in-experience.js").SocialSignIn;
|
|
866
|
+
socialSignInConnectorTargets: import("../foundations/jsonb-types/sign-in-experience.js").ConnectorTargets;
|
|
844
867
|
signInMode: import("../db-entries/custom-types.js").SignInMode;
|
|
845
868
|
customCss: string | null;
|
|
846
|
-
customContent: import("../
|
|
847
|
-
customUiAssets: import("../
|
|
848
|
-
passwordPolicy: import("../
|
|
849
|
-
mfa: import("../
|
|
869
|
+
customContent: import("../foundations/jsonb-types/sign-in-experience.js").CustomContent;
|
|
870
|
+
customUiAssets: import("../foundations/jsonb-types/sign-in-experience.js").CustomUiAssets | null;
|
|
871
|
+
passwordPolicy: import("../foundations/jsonb-types/logs.js").PartialPasswordPolicy;
|
|
872
|
+
mfa: import("../foundations/jsonb-types/sign-in-experience.js").Mfa;
|
|
850
873
|
singleSignOnEnabled: boolean;
|
|
851
874
|
supportEmail: string | null;
|
|
852
875
|
supportWebsiteUrl: string | null;
|
|
853
876
|
unknownSessionRedirectUrl: string | null;
|
|
877
|
+
captchaPolicy: import("../foundations/jsonb-types/sign-in-experience.js").CaptchaPolicy;
|
|
854
878
|
socialConnectors: {
|
|
855
879
|
name: {
|
|
856
880
|
en: string;
|
|
@@ -886,6 +910,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
886
910
|
"eu-ES"?: string | undefined;
|
|
887
911
|
"fa-IR"?: string | undefined;
|
|
888
912
|
"ff-NG"?: string | undefined;
|
|
913
|
+
fi?: string | undefined;
|
|
889
914
|
"fi-FI"?: string | undefined;
|
|
890
915
|
"fo-FO"?: string | undefined;
|
|
891
916
|
fr?: string | undefined;
|
|
@@ -934,6 +959,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
934
959
|
"my-MM"?: string | undefined;
|
|
935
960
|
"nb-NO"?: string | undefined;
|
|
936
961
|
"ne-NP"?: string | undefined;
|
|
962
|
+
nl?: string | undefined;
|
|
937
963
|
"nl-BE"?: string | undefined;
|
|
938
964
|
"nl-NL"?: string | undefined;
|
|
939
965
|
"nn-NO"?: string | undefined;
|
|
@@ -955,6 +981,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
955
981
|
"sn-ZW"?: string | undefined;
|
|
956
982
|
"sq-AL"?: string | undefined;
|
|
957
983
|
"sr-RS"?: string | undefined;
|
|
984
|
+
sv?: string | undefined;
|
|
958
985
|
"sv-SE"?: string | undefined;
|
|
959
986
|
"sw-KE"?: string | undefined;
|
|
960
987
|
"sy-SY"?: string | undefined;
|
|
@@ -962,6 +989,7 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
962
989
|
"ta-IN"?: string | undefined;
|
|
963
990
|
"te-IN"?: string | undefined;
|
|
964
991
|
"tg-TJ"?: string | undefined;
|
|
992
|
+
th?: string | undefined;
|
|
965
993
|
"th-TH"?: string | undefined;
|
|
966
994
|
"tl-PH"?: string | undefined;
|
|
967
995
|
tr?: string | undefined;
|
|
@@ -1006,5 +1034,9 @@ export declare const fullSignInExperienceGuard: z.ZodObject<z.objectUtil.extendS
|
|
|
1006
1034
|
closeOnTapOutside?: boolean | undefined;
|
|
1007
1035
|
itpSupport?: boolean | undefined;
|
|
1008
1036
|
} | undefined;
|
|
1037
|
+
captchaConfig?: {
|
|
1038
|
+
type: CaptchaType;
|
|
1039
|
+
siteKey: string;
|
|
1040
|
+
} | undefined;
|
|
1009
1041
|
}>;
|
|
1010
1042
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { connectorMetadataGuard, googleOneTapConfigGuard, } from '@logto/connector-kit';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { SignInExperiences } from '../db-entries/index.js';
|
|
4
|
+
import { CaptchaType } from '../foundations/jsonb-types/index.js';
|
|
4
5
|
import { ssoConnectorMetadataGuard } from './sso-connector.js';
|
|
5
6
|
export const fullSignInExperienceGuard = SignInExperiences.guard.extend({
|
|
6
7
|
socialConnectors: connectorMetadataGuard
|
|
@@ -18,4 +19,10 @@ export const fullSignInExperienceGuard = SignInExperiences.guard.extend({
|
|
|
18
19
|
googleOneTap: googleOneTapConfigGuard
|
|
19
20
|
.extend({ clientId: z.string(), connectorId: z.string() })
|
|
20
21
|
.optional(),
|
|
22
|
+
captchaConfig: z
|
|
23
|
+
.object({
|
|
24
|
+
type: z.nativeEnum(CaptchaType),
|
|
25
|
+
siteKey: z.string(),
|
|
26
|
+
})
|
|
27
|
+
.optional(),
|
|
21
28
|
});
|
|
@@ -114,8 +114,8 @@ export declare const ssoConnectorWithProviderConfigGuard: z.ZodObject<z.objectUt
|
|
|
114
114
|
tenantId: string;
|
|
115
115
|
createdAt: number;
|
|
116
116
|
branding: import("../index.js").SsoBranding;
|
|
117
|
-
syncProfile: boolean;
|
|
118
117
|
config: import("@withtyped/server").JsonObject;
|
|
118
|
+
syncProfile: boolean;
|
|
119
119
|
domains: import("../index.js").SsoDomains;
|
|
120
120
|
providerName: SsoProviderName;
|
|
121
121
|
connectorName: string;
|
|
@@ -129,8 +129,8 @@ export declare const ssoConnectorWithProviderConfigGuard: z.ZodObject<z.objectUt
|
|
|
129
129
|
tenantId: string;
|
|
130
130
|
createdAt: number;
|
|
131
131
|
branding: import("../index.js").SsoBranding;
|
|
132
|
-
syncProfile: boolean;
|
|
133
132
|
config: import("@withtyped/server").JsonObject;
|
|
133
|
+
syncProfile: boolean;
|
|
134
134
|
domains: import("../index.js").SsoDomains;
|
|
135
135
|
providerName: SsoProviderName;
|
|
136
136
|
connectorName: string;
|
package/lib/types/system.d.ts
CHANGED
|
@@ -67,14 +67,14 @@ export declare const storageProviderDataGuard: z.ZodDiscriminatedUnion<"provider
|
|
|
67
67
|
keyFilename: z.ZodString;
|
|
68
68
|
bucketName: z.ZodString;
|
|
69
69
|
}, "strip", z.ZodTypeAny, {
|
|
70
|
-
provider: StorageProvider.GoogleStorage;
|
|
71
70
|
projectId: string;
|
|
71
|
+
provider: StorageProvider.GoogleStorage;
|
|
72
72
|
keyFilename: string;
|
|
73
73
|
bucketName: string;
|
|
74
74
|
publicUrl?: string | undefined;
|
|
75
75
|
}, {
|
|
76
|
-
provider: StorageProvider.GoogleStorage;
|
|
77
76
|
projectId: string;
|
|
77
|
+
provider: StorageProvider.GoogleStorage;
|
|
78
78
|
keyFilename: string;
|
|
79
79
|
bucketName: string;
|
|
80
80
|
publicUrl?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@logto/schemas",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"author": "Silverhand Inc. <contact@silverhand.io>",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@logto/connector-kit": "^4.2.0",
|
|
67
67
|
"@logto/core-kit": "^2.5.4",
|
|
68
|
-
"@logto/language-kit": "^1.1.
|
|
68
|
+
"@logto/language-kit": "^1.1.3",
|
|
69
69
|
"@logto/phrases": "^1.18.0",
|
|
70
70
|
"@logto/phrases-experience": "^1.9.1",
|
|
71
71
|
"@logto/shared": "^3.1.4",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
create table captcha_providers (
|
|
2
|
+
tenant_id varchar(21) not null
|
|
3
|
+
references tenants (id) on update cascade on delete cascade,
|
|
4
|
+
id varchar(128) not null,
|
|
5
|
+
config jsonb /* @use CaptchaConfig */ not null default '{}'::jsonb,
|
|
6
|
+
created_at timestamptz not null default(now()),
|
|
7
|
+
updated_at timestamptz not null default(now()),
|
|
8
|
+
primary key (id),
|
|
9
|
+
unique (tenant_id)
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
create index captcha_providers__id
|
|
13
|
+
on captcha_providers (tenant_id, id);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* init_order = 2 */
|
|
2
|
+
|
|
3
|
+
create table one_time_tokens (
|
|
4
|
+
tenant_id varchar(21) not null
|
|
5
|
+
references tenants (id) on update cascade on delete cascade,
|
|
6
|
+
id varchar(21) not null,
|
|
7
|
+
email varchar(128) not null,
|
|
8
|
+
token varchar(256) not null,
|
|
9
|
+
context jsonb /* @use OneTimeTokenContext */ not null default '{}'::jsonb,
|
|
10
|
+
status varchar(64) /* @use OneTimeTokenStatus */ not null default 'active',
|
|
11
|
+
created_at timestamptz not null default(now()),
|
|
12
|
+
expires_at timestamptz not null,
|
|
13
|
+
primary key (id)
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
create index one_time_token__email_status on one_time_tokens (tenant_id, email, status);
|
|
17
|
+
|
|
18
|
+
create unique index one_time_token__token on one_time_tokens (tenant_id, token);
|