2022-06-17 10:36:07 +08:00
|
|
|
create type sign_in_mode as enum ('SignIn', 'Register', 'SignInAndRegister');
|
2024-06-18 21:47:21 +08:00
|
|
|
create type agree_to_terms_policy as enum ('Automatic', 'ManualRegistrationOnly', 'Manual');
|
2022-06-17 10:36:07 +08:00
|
|
|
|
2022-01-25 11:48:47 +08:00
|
|
|
create table sign_in_experiences (
|
2023-01-19 20:27:01 +08:00
|
|
|
tenant_id varchar(21) not null
|
|
|
|
references tenants (id) on update cascade on delete cascade,
|
2022-04-18 15:27:58 +08:00
|
|
|
id varchar(21) not null,
|
2022-06-24 10:26:30 +08:00
|
|
|
color jsonb /* @use Color */ not null,
|
2022-04-18 17:06:13 +08:00
|
|
|
branding jsonb /* @use Branding */ not null,
|
|
|
|
language_info jsonb /* @use LanguageInfo */ not null,
|
2022-12-15 17:04:42 +08:00
|
|
|
terms_of_use_url varchar(2048),
|
2023-03-08 10:56:26 +08:00
|
|
|
privacy_policy_url varchar(2048),
|
2024-06-18 21:47:21 +08:00
|
|
|
/** The policy that determines how users agree to the terms of use and privacy policy. */
|
|
|
|
agree_to_terms_policy agree_to_terms_policy not null default 'Automatic',
|
2022-10-09 15:31:40 +08:00
|
|
|
sign_in jsonb /* @use SignIn */ not null,
|
|
|
|
sign_up jsonb /* @use SignUp */ not null,
|
2024-06-08 20:23:57 +08:00
|
|
|
social_sign_in jsonb /* @use SocialSignIn */ not null default '{}'::jsonb,
|
2022-05-17 17:09:42 +08:00
|
|
|
social_sign_in_connector_targets jsonb /* @use ConnectorTargets */ not null default '[]'::jsonb,
|
2022-06-17 10:36:07 +08:00
|
|
|
sign_in_mode sign_in_mode not null default 'SignInAndRegister',
|
2023-02-21 10:55:44 +08:00
|
|
|
custom_css text,
|
2023-03-14 11:06:01 +08:00
|
|
|
custom_content jsonb /* @use CustomContent */ not null default '{}'::jsonb,
|
2024-07-16 00:06:09 +08:00
|
|
|
custom_ui_assets jsonb /* @use CustomUiAssets */,
|
2023-09-03 02:11:22 +08:00
|
|
|
password_policy jsonb /* @use PartialPasswordPolicy */ not null default '{}'::jsonb,
|
2023-09-12 10:36:47 +08:00
|
|
|
mfa jsonb /* @use Mfa */ not null default '{}'::jsonb,
|
2023-11-30 16:34:08 +08:00
|
|
|
single_sign_on_enabled boolean not null default false,
|
2024-11-12 09:51:34 +08:00
|
|
|
support_email text,
|
|
|
|
support_website_url text,
|
2024-11-13 10:29:14 +08:00
|
|
|
unknown_session_redirect_url text,
|
2023-02-20 00:27:12 +08:00
|
|
|
primary key (tenant_id, id)
|
2022-03-15 16:46:23 +08:00
|
|
|
);
|