@adonis-agora/authkit-server 0.47.0 → 0.49.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/build/commands/clients_create.js +4 -4
- package/build/commands/configure.js +3 -2
- package/build/commands/doctor.js +8 -5
- package/build/commands/eject.js +1 -1
- package/build/commands/expire_scan.js +7 -5
- package/build/commands/import_users.js +1 -1
- package/build/commands/keys_rotate.js +7 -4
- package/build/host/views/account/apps.edge +5 -5
- package/build/host/views/account/login.edge +1 -1
- package/build/host/views/account/mfa.edge +7 -7
- package/build/host/views/account/orgs.edge +5 -5
- package/build/host/views/account/security.edge +10 -10
- package/build/host/views/account/tokens.edge +5 -5
- package/build/index.d.ts +22 -7
- package/build/index.js +18 -5
- package/build/providers/authkit_server_provider.d.ts +2 -2
- package/build/providers/authkit_server_provider.js +20 -11
- package/build/services/main.d.ts +1 -1
- package/build/services/main.js +2 -2
- package/build/src/accounts/lucid_account_store.d.ts +3 -3
- package/build/src/accounts/lucid_account_store.js +6 -8
- package/build/src/accounts/lucid_store/core.js +1 -1
- package/build/src/accounts/lucid_store/mfa.js +1 -1
- package/build/src/accounts/lucid_store/organizations.js +2 -4
- package/build/src/accounts/lucid_store/password_hygiene.js +1 -4
- package/build/src/accounts/lucid_store/shared.d.ts +1 -1
- package/build/src/accounts/lucid_stores.d.ts +3 -3
- package/build/src/accounts/lucid_stores.js +2 -2
- package/build/src/adapters/database_adapter.js +3 -1
- package/build/src/adapters/factory.js +1 -1
- package/build/src/adapters/redis_adapter.js +2 -1
- package/build/src/commands/expire_scan_command.js +19 -5
- package/build/src/commands/settings_commands.js +22 -5
- package/build/src/define_config.d.ts +20 -20
- package/build/src/define_config.js +62 -67
- package/build/src/doctor/checks.js +45 -20
- package/build/src/events/dispatcher.d.ts +1 -1
- package/build/src/events/dispatcher.js +10 -10
- package/build/src/host/account_api/account_api_controller.js +95 -39
- package/build/src/host/account_deletion_ops.d.ts +4 -4
- package/build/src/host/account_deletion_ops.js +5 -5
- package/build/src/host/account_deletion_service.d.ts +2 -2
- package/build/src/host/account_deletion_service.js +2 -2
- package/build/src/host/account_export_service.d.ts +1 -1
- package/build/src/host/account_export_service.js +4 -6
- package/build/src/host/account_home.d.ts +0 -8
- package/build/src/host/account_home.js +6 -4
- package/build/src/host/account_login_url.d.ts +6 -3
- package/build/src/host/account_login_url.js +16 -8
- package/build/src/host/account_paths.d.ts +120 -0
- package/build/src/host/account_paths.js +161 -0
- package/build/src/host/account_screen_props.d.ts +163 -0
- package/build/src/host/account_screen_props.js +23 -0
- package/build/src/host/admin_api/admin_orgs_service.d.ts +2 -2
- package/build/src/host/admin_api/admin_orgs_service.js +3 -2
- package/build/src/host/admin_api/admin_users_service.d.ts +12 -12
- package/build/src/host/admin_api/admin_users_service.js +20 -20
- package/build/src/host/admin_api/api_clients_controller.js +2 -2
- package/build/src/host/admin_api/api_misc_controller.js +2 -2
- package/build/src/host/admin_api/api_orgs_controller.js +3 -3
- package/build/src/host/admin_api/api_settings_controller.js +11 -5
- package/build/src/host/admin_api/api_users_controller.d.ts +2 -2
- package/build/src/host/admin_api/api_users_controller.js +37 -38
- package/build/src/host/admin_api/dto.d.ts +4 -4
- package/build/src/host/admin_clients_service.js +5 -4
- package/build/src/host/admin_console/admin_shell_controller.js +4 -2
- package/build/src/host/admin_console/console_audit_controller.js +1 -1
- package/build/src/host/admin_console/console_clients_controller.js +5 -3
- package/build/src/host/admin_console/console_impersonation_controller.js +1 -1
- package/build/src/host/admin_console/console_keys_controller.js +2 -4
- package/build/src/host/admin_console/console_orgs_controller.js +3 -3
- package/build/src/host/admin_console/console_roles_controller.js +30 -12
- package/build/src/host/admin_console/console_sessions_controller.js +3 -3
- package/build/src/host/admin_console/console_settings_controller.js +11 -5
- package/build/src/host/admin_console/console_users_controller.d.ts +2 -2
- package/build/src/host/admin_console/console_users_controller.js +46 -47
- package/build/src/host/admin_prefix.js +2 -2
- package/build/src/host/admin_sessions_service.js +1 -3
- package/build/src/host/adonis_auth_sync.d.ts +1 -1
- package/build/src/host/adonis_auth_user_provider.d.ts +1 -1
- package/build/src/host/app_key.js +1 -1
- package/build/src/host/avatar_storage.js +1 -3
- package/build/src/host/config_locks.js +1 -3
- package/build/src/host/console_session.js +1 -1
- package/build/src/host/controllers/account_apps_controller.js +3 -2
- package/build/src/host/controllers/account_confirm_controller.js +5 -8
- package/build/src/host/controllers/account_mfa_controller.js +72 -18
- package/build/src/host/controllers/account_orgs_controller.js +47 -27
- package/build/src/host/controllers/account_security_controller.d.ts +2 -2
- package/build/src/host/controllers/account_security_controller.js +116 -116
- package/build/src/host/controllers/account_session_controller.js +13 -8
- package/build/src/host/controllers/account_tokens_controller.js +3 -2
- package/build/src/host/controllers/interaction_controller.js +59 -22
- package/build/src/host/controllers/registration_controller.js +28 -13
- package/build/src/host/default_mailer.js +11 -7
- package/build/src/host/durable/account_deletion_workflow.d.ts +2 -2
- package/build/src/host/durable/account_deletion_workflow.js +14 -14
- package/build/src/host/durable/account_export_workflow.d.ts +2 -2
- package/build/src/host/durable/account_export_workflow.js +12 -12
- package/build/src/host/durable/index.d.ts +5 -5
- package/build/src/host/durable/index.js +6 -6
- package/build/src/host/i18n.d.ts +1376 -1376
- package/build/src/host/i18n.js +1380 -1380
- package/build/src/host/impersonation.js +1 -7
- package/build/src/host/key_rotation_actions.d.ts +1 -1
- package/build/src/host/login_attempt.js +35 -6
- package/build/src/host/login_notify.js +1 -1
- package/build/src/host/otp_lockout.js +1 -3
- package/build/src/host/rate_limit.js +1 -1
- package/build/src/host/register_auth_host.d.ts +30 -0
- package/build/src/host/register_auth_host.js +120 -74
- package/build/src/host/renderers/edge_renderer.js +15 -2
- package/build/src/host/renderers/inertia_renderer.d.ts +23 -58
- package/build/src/host/renderers/inertia_renderer.js +23 -58
- package/build/src/host/runtime_settings.js +1 -1
- package/build/src/host/runtime_toggles.d.ts +3 -3
- package/build/src/host/runtime_toggles.js +69 -24
- package/build/src/host/security_notice_service.d.ts +1 -1
- package/build/src/host/security_notice_service.js +1 -1
- package/build/src/host/session_context.js +1 -1
- package/build/src/host/sudo/index.d.ts +3 -3
- package/build/src/host/sudo/index.js +3 -3
- package/build/src/host/sudo/methods/magic_link.js +6 -5
- package/build/src/host/sudo/methods/passkey.js +7 -4
- package/build/src/host/sudo/methods/password.js +8 -3
- package/build/src/host/sudo/runtime.js +6 -13
- package/build/src/host/sudo_mode.js +3 -2
- package/build/src/host/ui-dist/assets/index-BQoTDiLV.js +137 -0
- package/build/src/host/ui-dist/index.html +1 -1
- package/build/src/keys/jwks_manager.js +1 -1
- package/build/src/keys/keystore.js +1 -1
- package/build/src/keys/keystore_manager.d.ts +2 -2
- package/build/src/keys/keystore_manager.js +2 -2
- package/build/src/keys/keystore_vault.js +8 -4
- package/build/src/mixins/with_audit_log.d.ts +1 -1
- package/build/src/mixins/with_auth_user.d.ts +1 -1
- package/build/src/mixins/with_auth_user.js +1 -1
- package/build/src/mixins/with_credentials.d.ts +1 -1
- package/build/src/mixins/with_mfa.d.ts +1 -1
- package/build/src/mixins/with_personal_access_token.d.ts +1 -1
- package/build/src/mixins/with_provider_identity.d.ts +1 -1
- package/build/src/mixins/with_webauthn_credential.d.ts +1 -1
- package/build/src/observability/diagnostics_bridge.js +2 -2
- package/build/src/observability/metrics_service.js +1 -1
- package/build/src/observability/telescope/data_providers.d.ts +1 -1
- package/build/src/observability/telescope/data_providers.js +29 -43
- package/build/src/observability/telescope/extension.d.ts +1 -1
- package/build/src/observability/telescope/extension.js +58 -58
- package/build/src/observability/telescope/index.d.ts +2 -2
- package/build/src/observability/telescope/index.js +2 -2
- package/build/src/observability/wire_provider_events.d.ts +1 -1
- package/build/src/observability/wire_provider_events.js +11 -11
- package/build/src/password/common_passwords.js +1 -1
- package/build/src/password/password_manager.d.ts +1 -1
- package/build/src/password/password_manager.js +4 -4
- package/build/src/pat/lucid_pat_store.js +2 -6
- package/build/src/pat/pat_tokens.js +1 -1
- package/build/src/provider/interaction_actions.js +1 -1
- package/build/src/provider/key_rotation_scheduler.js +3 -1
- package/build/src/provider/logout_sources.js +2 -8
- package/build/src/provider/oidc_service.d.ts +2 -2
- package/build/src/provider/oidc_service.js +22 -14
- package/build/src/provider/single_flight_lock.js +1 -3
- package/build/src/provider/token_exchange.d.ts +1 -1
- package/build/src/schema/ensure.js +3 -1
- package/build/stubs/ui/react/components/auth_shell.tsx +19 -19
- package/build/stubs/ui/react/pages/account/login.tsx +6 -7
- package/build/stubs/ui/react/pages/account/mfa.tsx +16 -15
- package/build/stubs/ui/react/pages/account/tokens.tsx +27 -17
- package/build/stubs/ui/react/pages/consent.tsx +12 -12
- package/build/stubs/ui/react/pages/forgot.tsx +7 -7
- package/build/stubs/ui/react/pages/login.tsx +22 -24
- package/build/stubs/ui/react/pages/mfa-challenge.tsx +9 -10
- package/build/stubs/ui/react/pages/reset.tsx +10 -10
- package/build/stubs/ui/react/pages/signup.tsx +30 -16
- package/build/stubs/ui/react/pages/verify-email.tsx +6 -6
- package/package.json +2 -2
- package/stubs/main.ts +2 -2
- package/stubs/ui/react/components/auth_shell.tsx +19 -19
- package/stubs/ui/react/pages/account/login.tsx +6 -7
- package/stubs/ui/react/pages/account/mfa.tsx +16 -15
- package/stubs/ui/react/pages/account/tokens.tsx +27 -17
- package/stubs/ui/react/pages/consent.tsx +12 -12
- package/stubs/ui/react/pages/forgot.tsx +7 -7
- package/stubs/ui/react/pages/login.tsx +22 -24
- package/stubs/ui/react/pages/mfa-challenge.tsx +9 -10
- package/stubs/ui/react/pages/reset.tsx +10 -10
- package/stubs/ui/react/pages/signup.tsx +30 -16
- package/stubs/ui/react/pages/verify-email.tsx +6 -6
- package/build/src/host/ui-dist/assets/index-BmI_J87g.js +0 -137
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
{
|
|
2
|
-
exports({ to: app.makePath('inertia/pages/authkit/mfa-challenge.tsx') })
|
|
3
|
-
}
|
|
4
|
-
import AuthShell from '../components/auth_shell'
|
|
1
|
+
{
|
|
2
|
+
exports({ to: app.makePath('inertia/pages/authkit/mfa-challenge.tsx') });
|
|
3
|
+
}
|
|
4
|
+
import AuthShell from '../components/auth_shell';
|
|
5
5
|
|
|
6
6
|
const inputClass =
|
|
7
|
-
'w-full rounded-lg border border-gray-300 px-3 py-2 text-center text-lg tracking-[0.4em] outline-none transition focus:border-transparent focus:ring-2 focus:ring-gray-800'
|
|
7
|
+
'w-full rounded-lg border border-gray-300 px-3 py-2 text-center text-lg tracking-[0.4em] outline-none transition focus:border-transparent focus:ring-2 focus:ring-gray-800';
|
|
8
8
|
|
|
9
9
|
export default function AuthkitMfaChallenge({
|
|
10
10
|
uid,
|
|
11
11
|
csrfToken,
|
|
12
12
|
error,
|
|
13
13
|
}: {
|
|
14
|
-
uid: string
|
|
15
|
-
csrfToken: string
|
|
16
|
-
error?: string
|
|
14
|
+
uid: string;
|
|
15
|
+
csrfToken: string;
|
|
16
|
+
error?: string;
|
|
17
17
|
}) {
|
|
18
18
|
return (
|
|
19
19
|
<AuthShell>
|
|
@@ -37,7 +37,6 @@ export default function AuthkitMfaChallenge({
|
|
|
37
37
|
autoComplete="one-time-code"
|
|
38
38
|
pattern="[0-9]*"
|
|
39
39
|
maxLength={6}
|
|
40
|
-
autoFocus
|
|
41
40
|
className={inputClass}
|
|
42
41
|
/>
|
|
43
42
|
</div>
|
|
@@ -68,5 +67,5 @@ export default function AuthkitMfaChallenge({
|
|
|
68
67
|
</form>
|
|
69
68
|
</details>
|
|
70
69
|
</AuthShell>
|
|
71
|
-
)
|
|
70
|
+
);
|
|
72
71
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
{
|
|
2
|
-
exports({ to: app.makePath('inertia/pages/authkit/reset.tsx') })
|
|
3
|
-
}
|
|
4
|
-
import AuthShell from '../../components/auth_shell'
|
|
1
|
+
{
|
|
2
|
+
exports({ to: app.makePath('inertia/pages/authkit/reset.tsx') });
|
|
3
|
+
}
|
|
4
|
+
import AuthShell from '../../components/auth_shell';
|
|
5
5
|
|
|
6
6
|
const inputClass =
|
|
7
|
-
'w-full rounded-lg border border-gray-300 px-3 py-2 text-sm outline-none transition focus:border-transparent focus:ring-2 focus:ring-gray-800'
|
|
7
|
+
'w-full rounded-lg border border-gray-300 px-3 py-2 text-sm outline-none transition focus:border-transparent focus:ring-2 focus:ring-gray-800';
|
|
8
8
|
|
|
9
9
|
export default function AuthkitReset({
|
|
10
10
|
token,
|
|
11
11
|
csrfToken,
|
|
12
12
|
done,
|
|
13
13
|
}: {
|
|
14
|
-
token: string
|
|
15
|
-
csrfToken: string
|
|
16
|
-
done?: boolean
|
|
14
|
+
token: string;
|
|
15
|
+
csrfToken: string;
|
|
16
|
+
done?: boolean;
|
|
17
17
|
}) {
|
|
18
18
|
if (done) {
|
|
19
19
|
return (
|
|
@@ -21,7 +21,7 @@ export default function AuthkitReset({
|
|
|
21
21
|
<h1 className="text-xl font-semibold text-gray-900">Senha redefinida</h1>
|
|
22
22
|
<p className="mt-2 text-sm text-gray-600">Você já pode entrar com a nova senha.</p>
|
|
23
23
|
</AuthShell>
|
|
24
|
-
)
|
|
24
|
+
);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
return (
|
|
@@ -54,5 +54,5 @@ export default function AuthkitReset({
|
|
|
54
54
|
</button>
|
|
55
55
|
</form>
|
|
56
56
|
</AuthShell>
|
|
57
|
-
)
|
|
57
|
+
);
|
|
58
58
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
{
|
|
2
|
-
exports({ to: app.makePath('inertia/pages/authkit/signup.tsx') })
|
|
3
|
-
}
|
|
4
|
-
import AuthShell, { type AuthBrand } from '../../components/auth_shell'
|
|
1
|
+
{
|
|
2
|
+
exports({ to: app.makePath('inertia/pages/authkit/signup.tsx') });
|
|
3
|
+
}
|
|
4
|
+
import AuthShell, { type AuthBrand } from '../../components/auth_shell';
|
|
5
5
|
|
|
6
6
|
const inputClass =
|
|
7
|
-
'w-full rounded-lg border border-gray-300 px-3 py-2 text-sm outline-none transition focus:border-transparent focus:ring-2'
|
|
7
|
+
'w-full rounded-lg border border-gray-300 px-3 py-2 text-sm outline-none transition focus:border-transparent focus:ring-2';
|
|
8
8
|
|
|
9
9
|
export default function AuthkitSignup({
|
|
10
10
|
uid,
|
|
@@ -12,17 +12,17 @@ export default function AuthkitSignup({
|
|
|
12
12
|
error,
|
|
13
13
|
brand,
|
|
14
14
|
}: {
|
|
15
|
-
uid: string
|
|
16
|
-
csrfToken: string
|
|
17
|
-
error?: string
|
|
18
|
-
brand?: AuthBrand
|
|
15
|
+
uid: string;
|
|
16
|
+
csrfToken: string;
|
|
17
|
+
error?: string;
|
|
18
|
+
brand?: AuthBrand;
|
|
19
19
|
}) {
|
|
20
|
-
const accent = brand?.accent ?? '#111827'
|
|
21
|
-
const focusStyle = { ['--tw-ring-color' as any]: accent }
|
|
20
|
+
const accent = brand?.accent ?? '#111827';
|
|
21
|
+
const focusStyle = { ['--tw-ring-color' as any]: accent };
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
24
|
<AuthShell brand={brand}>
|
|
25
|
-
<form method="POST" action={
|
|
25
|
+
<form method="POST" action={`/auth/interaction/${uid}/signup`}>
|
|
26
26
|
<input type="hidden" name="_csrf" value={csrfToken} />
|
|
27
27
|
<h1 className="text-xl font-semibold text-gray-900">Criar conta</h1>
|
|
28
28
|
<p className="mt-1 text-sm text-gray-500">Preencha seus dados para começar.</p>
|
|
@@ -33,14 +33,28 @@ export default function AuthkitSignup({
|
|
|
33
33
|
<label htmlFor="fullName" className="mb-1 block text-sm font-medium text-gray-700">
|
|
34
34
|
Nome
|
|
35
35
|
</label>
|
|
36
|
-
<input
|
|
36
|
+
<input
|
|
37
|
+
id="fullName"
|
|
38
|
+
name="fullName"
|
|
39
|
+
type="text"
|
|
40
|
+
required
|
|
41
|
+
className={inputClass}
|
|
42
|
+
style={focusStyle}
|
|
43
|
+
/>
|
|
37
44
|
</div>
|
|
38
45
|
|
|
39
46
|
<div className="mt-4">
|
|
40
47
|
<label htmlFor="email" className="mb-1 block text-sm font-medium text-gray-700">
|
|
41
48
|
E-mail
|
|
42
49
|
</label>
|
|
43
|
-
<input
|
|
50
|
+
<input
|
|
51
|
+
id="email"
|
|
52
|
+
name="email"
|
|
53
|
+
type="email"
|
|
54
|
+
required
|
|
55
|
+
className={inputClass}
|
|
56
|
+
style={focusStyle}
|
|
57
|
+
/>
|
|
44
58
|
</div>
|
|
45
59
|
|
|
46
60
|
<div className="mt-4">
|
|
@@ -67,12 +81,12 @@ export default function AuthkitSignup({
|
|
|
67
81
|
</button>
|
|
68
82
|
|
|
69
83
|
<a
|
|
70
|
-
href={
|
|
84
|
+
href={`/auth/interaction/${uid}`}
|
|
71
85
|
className="mt-4 block text-center text-sm text-gray-600 hover:underline"
|
|
72
86
|
>
|
|
73
87
|
Já tenho conta
|
|
74
88
|
</a>
|
|
75
89
|
</form>
|
|
76
90
|
</AuthShell>
|
|
77
|
-
)
|
|
91
|
+
);
|
|
78
92
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
exports({ to: app.makePath('inertia/pages/authkit/verify-email.tsx') })
|
|
3
|
-
}
|
|
4
|
-
import AuthShell from '../../components/auth_shell'
|
|
1
|
+
{
|
|
2
|
+
exports({ to: app.makePath('inertia/pages/authkit/verify-email.tsx') });
|
|
3
|
+
}
|
|
4
|
+
import AuthShell from '../../components/auth_shell';
|
|
5
5
|
|
|
6
6
|
export default function AuthkitVerifyEmail({ verified }: { verified?: boolean }) {
|
|
7
7
|
if (verified) {
|
|
@@ -10,7 +10,7 @@ export default function AuthkitVerifyEmail({ verified }: { verified?: boolean })
|
|
|
10
10
|
<h1 className="text-xl font-semibold text-gray-900">E-mail verificado</h1>
|
|
11
11
|
<p className="mt-2 text-sm text-gray-600">Seu e-mail foi confirmado com sucesso.</p>
|
|
12
12
|
</AuthShell>
|
|
13
|
-
)
|
|
13
|
+
);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
return (
|
|
@@ -20,5 +20,5 @@ export default function AuthkitVerifyEmail({ verified }: { verified?: boolean })
|
|
|
20
20
|
O link de verificação é inválido ou já foi utilizado.
|
|
21
21
|
</p>
|
|
22
22
|
</AuthShell>
|
|
23
|
-
)
|
|
23
|
+
);
|
|
24
24
|
}
|