@adonis-agora/authkit-server 0.61.3 → 0.61.4
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/settings_get.js +1 -1
- package/build/commands/settings_set.js +1 -1
- package/build/commands/settings_unset.js +1 -1
- package/build/index.d.ts +99 -118
- package/build/index.js +75 -84
- package/build/src/accounts/lucid_store/core.js +1 -1
- package/build/src/accounts/lucid_store/mfa.d.ts +0 -12
- package/build/src/accounts/lucid_store/mfa.js +16 -16
- package/build/src/audit/audit_sink.d.ts +1 -1
- package/build/src/commands/import_users.js +3 -1
- package/build/src/define_config.d.ts +2 -2
- package/build/src/host/account_api/account_api_controller.js +1 -1
- package/build/src/host/account_paths.d.ts +9 -9
- package/build/src/host/admin_api/api_orgs_controller.d.ts +10 -10
- package/build/src/host/admin_api/api_settings_controller.d.ts +3 -3
- package/build/src/host/admin_api/api_settings_controller.js +1 -1
- package/build/src/host/admin_api/api_users_controller.d.ts +3 -3
- package/build/src/host/admin_api/dto.d.ts +12 -13
- package/build/src/host/admin_console/console_orgs_controller.d.ts +9 -9
- package/build/src/host/admin_console/console_roles_controller.js +1 -1
- package/build/src/host/admin_console/console_settings_controller.d.ts +2 -2
- package/build/src/host/admin_console/console_settings_controller.js +1 -1
- package/build/src/host/admin_console/console_users_controller.d.ts +7 -7
- package/build/src/host/admin_validators.d.ts +39 -39
- package/build/src/host/bot_protection.d.ts +1 -1
- package/build/src/host/config_locks.d.ts +1 -1
- package/build/src/host/controllers/account_confirm_controller.js +1 -1
- package/build/src/host/controllers/account_security_controller.js +1 -1
- package/build/src/host/controllers/interaction_controller.js +2 -3
- package/build/src/host/durable/index.d.ts +2 -2
- package/build/src/host/durable/index.js +2 -2
- package/build/src/host/login_methods_state.js +2 -5
- package/build/src/host/login_notify.js +1 -1
- package/build/src/host/oidc_rp_guard.d.ts +1 -1
- package/build/src/host/runtime_settings.js +1 -1
- package/build/src/host/runtime_toggles.d.ts +23 -23
- package/build/src/host/sudo/index.d.ts +1 -1
- package/build/src/host/ui-dist/assets/index-Dp__4wlB.js +155 -0
- package/build/src/host/ui-dist/index.html +1 -1
- package/build/src/host/validators.d.ts +15 -15
- package/build/src/observability/telescope/index.d.ts +2 -2
- package/build/src/observability/telescope/index.js +1 -1
- package/build/src/password/password_manager.js +1 -1
- package/build/src/provider/oidc_service.d.ts +1 -1
- package/build/stubs/ui/react/components/auth_shell.tsx +2 -7
- package/build/stubs/ui/react/pages/consent.tsx +1 -0
- package/build/stubs/ui/react/pages/forgot.tsx +1 -0
- package/build/stubs/ui/react/pages/login.tsx +1 -0
- package/build/stubs/ui/react/pages/mfa-challenge.tsx +1 -0
- package/build/stubs/ui/react/pages/reset.tsx +1 -0
- package/build/stubs/ui/react/pages/signup.tsx +1 -0
- package/build/stubs/ui/react/pages/verify-email.tsx +1 -0
- package/build/types.d.ts +1 -1
- package/package.json +32 -31
- package/stubs/ui/react/components/auth_shell.tsx +2 -7
- package/stubs/ui/react/pages/consent.tsx +1 -0
- package/stubs/ui/react/pages/forgot.tsx +1 -0
- package/stubs/ui/react/pages/login.tsx +1 -0
- package/stubs/ui/react/pages/mfa-challenge.tsx +1 -0
- package/stubs/ui/react/pages/reset.tsx +1 -0
- package/stubs/ui/react/pages/signup.tsx +1 -0
- package/stubs/ui/react/pages/verify-email.tsx +1 -0
- package/build/src/host/ui-dist/assets/index-Cb38N16r.js +0 -155
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
9
9
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
10
10
|
<link href="https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=JetBrains+Mono:ital,wght@0,400;0,500;0,600;1,400&display=swap" rel="stylesheet">
|
|
11
|
-
<script type="module" crossorigin src="/__AUTHKIT_BASE__/assets/index-
|
|
11
|
+
<script type="module" crossorigin src="/__AUTHKIT_BASE__/assets/index-Dp__4wlB.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/__AUTHKIT_BASE__/assets/index-DTSmD4RU.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
@@ -18,16 +18,16 @@ export declare const signupValidator: import("@vinejs/vine").VineValidator<impor
|
|
|
18
18
|
password: import("@vinejs/vine").VineString;
|
|
19
19
|
}, {
|
|
20
20
|
email: string;
|
|
21
|
-
password: string;
|
|
22
21
|
fullName: string;
|
|
22
|
+
password: string;
|
|
23
23
|
}, {
|
|
24
24
|
email: string;
|
|
25
|
-
password: string;
|
|
26
25
|
fullName: string;
|
|
26
|
+
password: string;
|
|
27
27
|
}, {
|
|
28
28
|
email: string;
|
|
29
|
-
password: string;
|
|
30
29
|
fullName: string;
|
|
30
|
+
password: string;
|
|
31
31
|
}>, Record<string, any> | undefined>;
|
|
32
32
|
export declare const forgotPasswordValidator: import("@vinejs/vine").VineValidator<import("@vinejs/vine").VineObject<{
|
|
33
33
|
email: import("@vinejs/vine").VineString;
|
|
@@ -60,14 +60,14 @@ export declare const changePasswordValidator: import("@vinejs/vine").VineValidat
|
|
|
60
60
|
currentPassword: import("@vinejs/vine").VineString;
|
|
61
61
|
newPassword: import("@vinejs/vine").VineString;
|
|
62
62
|
}, {
|
|
63
|
-
newPassword: string;
|
|
64
63
|
currentPassword: string;
|
|
65
|
-
}, {
|
|
66
64
|
newPassword: string;
|
|
67
|
-
currentPassword: string;
|
|
68
65
|
}, {
|
|
66
|
+
currentPassword: string;
|
|
69
67
|
newPassword: string;
|
|
68
|
+
}, {
|
|
70
69
|
currentPassword: string;
|
|
70
|
+
newPassword: string;
|
|
71
71
|
}>, Record<string, any> | undefined>;
|
|
72
72
|
/**
|
|
73
73
|
* Troca de e-mail no console de conta: senha atual (opcional — pode ser
|
|
@@ -94,14 +94,14 @@ export declare const updateProfileValidator: import("@vinejs/vine").VineValidato
|
|
|
94
94
|
name: import("@vinejs/vine/schema/base/literal").OptionalModifier<import("@vinejs/vine").VineString>;
|
|
95
95
|
avatarUrl: import("@vinejs/vine/schema/base/literal").OptionalModifier<import("@vinejs/vine").VineString>;
|
|
96
96
|
}, {
|
|
97
|
-
name?: string | null | undefined;
|
|
98
97
|
avatarUrl?: string | null | undefined;
|
|
98
|
+
name?: string | null | undefined;
|
|
99
99
|
}, {
|
|
100
|
-
name?: string | undefined;
|
|
101
100
|
avatarUrl?: string | undefined;
|
|
102
|
-
}, {
|
|
103
101
|
name?: string | undefined;
|
|
102
|
+
}, {
|
|
104
103
|
avatarUrl?: string | undefined;
|
|
104
|
+
name?: string | undefined;
|
|
105
105
|
}>, Record<string, any> | undefined>;
|
|
106
106
|
/**
|
|
107
107
|
* Deleção self-service de conta (LGPD). Aceita confirmação por senha atual
|
|
@@ -112,14 +112,14 @@ export declare const deleteAccountValidator: import("@vinejs/vine").VineValidato
|
|
|
112
112
|
currentPassword: import("@vinejs/vine/schema/base/literal").OptionalModifier<import("@vinejs/vine").VineString>;
|
|
113
113
|
confirmEmail: import("@vinejs/vine/schema/base/literal").OptionalModifier<import("@vinejs/vine").VineString>;
|
|
114
114
|
}, {
|
|
115
|
-
currentPassword?: string | null | undefined;
|
|
116
115
|
confirmEmail?: string | null | undefined;
|
|
116
|
+
currentPassword?: string | null | undefined;
|
|
117
117
|
}, {
|
|
118
|
-
currentPassword?: string | undefined;
|
|
119
118
|
confirmEmail?: string | undefined;
|
|
120
|
-
}, {
|
|
121
119
|
currentPassword?: string | undefined;
|
|
120
|
+
}, {
|
|
122
121
|
confirmEmail?: string | undefined;
|
|
122
|
+
currentPassword?: string | undefined;
|
|
123
123
|
}>, Record<string, any> | undefined>;
|
|
124
124
|
/** Criação de usuário no console admin (email obrigatório; nome/senha opcionais). */
|
|
125
125
|
export declare const adminCreateUserValidator: import("@vinejs/vine").VineValidator<import("@vinejs/vine").VineObject<{
|
|
@@ -127,15 +127,15 @@ export declare const adminCreateUserValidator: import("@vinejs/vine").VineValida
|
|
|
127
127
|
name: import("@vinejs/vine/schema/base/literal").OptionalModifier<import("@vinejs/vine").VineString>;
|
|
128
128
|
password: import("@vinejs/vine/schema/base/literal").OptionalModifier<import("@vinejs/vine").VineString>;
|
|
129
129
|
}, {
|
|
130
|
+
email: string;
|
|
130
131
|
name?: string | null | undefined;
|
|
131
132
|
password?: string | null | undefined;
|
|
132
|
-
email: string;
|
|
133
133
|
}, {
|
|
134
|
+
email: string;
|
|
134
135
|
name?: string | undefined;
|
|
135
136
|
password?: string | undefined;
|
|
136
|
-
email: string;
|
|
137
137
|
}, {
|
|
138
|
+
email: string;
|
|
138
139
|
name?: string | undefined;
|
|
139
140
|
password?: string | undefined;
|
|
140
|
-
email: string;
|
|
141
141
|
}>, Record<string, any> | undefined>;
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* pulls in telescope. Import it ONLY from `config/telescope.ts`, where both
|
|
5
5
|
* `@adonis-agora/telescope` and `@adonis-agora/authkit-server` are installed.
|
|
6
6
|
*/
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
7
|
+
export { authkitDataProviders, authkitEventBreakdownProvider, authkitEventCountProvider, authkitLoginSuccessRateProvider, authkitLoginsOverTimeProvider, authkitTokenActivityProvider, } from './data_providers.js';
|
|
8
|
+
export { type AuthkitTelescopeOptions, defineAuthkitTelescopeExtension, } from './extension.js';
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* pulls in telescope. Import it ONLY from `config/telescope.ts`, where both
|
|
5
5
|
* `@adonis-agora/telescope` and `@adonis-agora/authkit-server` are installed.
|
|
6
6
|
*/
|
|
7
|
+
export { authkitDataProviders, authkitEventBreakdownProvider, authkitEventCountProvider, authkitLoginSuccessRateProvider, authkitLoginsOverTimeProvider, authkitTokenActivityProvider, } from './data_providers.js';
|
|
7
8
|
export { defineAuthkitTelescopeExtension, } from './extension.js';
|
|
8
|
-
export { authkitDataProviders, authkitEventCountProvider, authkitLoginSuccessRateProvider, authkitLoginsOverTimeProvider, authkitEventBreakdownProvider, authkitTokenActivityProvider, } from './data_providers.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createHmac } from 'node:crypto';
|
|
2
2
|
import { isCommonPassword } from './common_passwords.js';
|
|
3
|
-
import {
|
|
3
|
+
import { checkPasswordPolicy, DEFAULT_PWNED_TIMEOUT_MS, policyViolationParams, resolvePasswordConfig, } from './policy.js';
|
|
4
4
|
import { isPasswordPwned } from './pwned.js';
|
|
5
5
|
/** Erro de política/vazamento de senha — carrega a chave i18n + params. */
|
|
6
6
|
export class PasswordPolicyError extends Error {
|
|
@@ -2,7 +2,7 @@ import { type MetricsRecorder } from '@adonis-agora/authkit-core';
|
|
|
2
2
|
import type { ResolvedServerConfig } from '../define_config.js';
|
|
3
3
|
import { type ManagedKeyInfo } from '../keys/keystore.js';
|
|
4
4
|
import type { KeystoreManager } from '../keys/keystore_manager.js';
|
|
5
|
-
import { type SessionTtlHolder, type TokenTtlHolder
|
|
5
|
+
import { buildProvider, type SessionTtlHolder, type TokenTtlHolder } from './build_provider.js';
|
|
6
6
|
import { type InteractionActions } from './interaction_actions.js';
|
|
7
7
|
export declare class OidcService {
|
|
8
8
|
#private;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
exports({ to: app.makePath('inertia/components/auth_shell.tsx') });
|
|
3
3
|
}
|
|
4
|
+
|
|
4
5
|
import type { ReactNode } from 'react';
|
|
5
6
|
|
|
6
7
|
export interface AuthBrand {
|
|
@@ -18,13 +19,7 @@ const COMPANY_FALLBACK = 'Acme';
|
|
|
18
19
|
* Layout de duas colunas para as telas de autenticacao do IdP.
|
|
19
20
|
* Painel esquerdo: marca (empresa guarda-chuva + produto). Painel direito: formulario.
|
|
20
21
|
*/
|
|
21
|
-
export default function AuthShell({
|
|
22
|
-
brand,
|
|
23
|
-
children,
|
|
24
|
-
}: {
|
|
25
|
-
brand?: AuthBrand;
|
|
26
|
-
children: ReactNode;
|
|
27
|
-
}) {
|
|
22
|
+
export default function AuthShell({ brand, children }: { brand?: AuthBrand; children: ReactNode }) {
|
|
28
23
|
const accent = brand?.accent ?? '#111827';
|
|
29
24
|
const accentSoft = brand?.accentSoft ?? accent;
|
|
30
25
|
const company = brand?.company ?? COMPANY_FALLBACK;
|
package/build/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adonis-agora/authkit-server",
|
|
3
|
-
"version": "0.61.
|
|
3
|
+
"version": "0.61.4",
|
|
4
4
|
"description": "AdonisJS OIDC/OAuth2 provider (Identity Provider) toolkit: ejectable auth server with sessions, rate-limiting, MFA/TOTP, audit log, federated logout and OpenTelemetry metrics.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "dudousxd",
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
"@adonis-agora/telescope": ">=0.1.0 <1.0.0",
|
|
63
63
|
"@adonisjs/ally": "^6.3.0",
|
|
64
64
|
"@adonisjs/auth": "^10.1.0",
|
|
65
|
-
"@adonisjs/core": "^7.
|
|
65
|
+
"@adonisjs/core": "^7.5.0",
|
|
66
66
|
"@adonisjs/drive": "^4.0.0",
|
|
67
67
|
"@adonisjs/lock": "^2.1.0",
|
|
68
68
|
"@adonisjs/lucid": "^22.4.2",
|
|
69
|
-
"@adonisjs/redis": "^9.2.0",
|
|
69
|
+
"@adonisjs/redis": "^9.2.0 || ^10.0.0",
|
|
70
70
|
"@adonisjs/session": "^8.1.0",
|
|
71
71
|
"@adonisjs/shield": "^9.0.0",
|
|
72
|
-
"@vinejs/vine": "^4.
|
|
72
|
+
"@vinejs/vine": "^4.4.0",
|
|
73
73
|
"edge.js": "^6.5.1"
|
|
74
74
|
},
|
|
75
75
|
"peerDependenciesMeta": {
|
|
@@ -102,58 +102,59 @@
|
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
104
|
"dependencies": {
|
|
105
|
+
"@adonis-agora/authkit-core": "0.8.0",
|
|
105
106
|
"@simplewebauthn/browser": "13.3.0",
|
|
106
|
-
"@simplewebauthn/server": "13.3.
|
|
107
|
-
"jose": "
|
|
107
|
+
"@simplewebauthn/server": "13.3.3",
|
|
108
|
+
"jose": "6.2.10",
|
|
108
109
|
"koa": "3.2.1",
|
|
109
110
|
"koa-mount": "4.2.0",
|
|
110
|
-
"oidc-provider": "9.
|
|
111
|
-
"otplib": "
|
|
112
|
-
"qrcode": "1.5.4"
|
|
113
|
-
"@adonis-agora/authkit-core": "0.8.0"
|
|
111
|
+
"oidc-provider": "9.12.0",
|
|
112
|
+
"otplib": "13.5.0",
|
|
113
|
+
"qrcode": "1.5.4"
|
|
114
114
|
},
|
|
115
115
|
"devDependencies": {
|
|
116
|
-
"@adonis-agora/
|
|
117
|
-
"@adonis-agora/
|
|
118
|
-
"@
|
|
116
|
+
"@adonis-agora/authkit-react": "0.20.1",
|
|
117
|
+
"@adonis-agora/durable": "0.26.0",
|
|
118
|
+
"@adonis-agora/telescope": "0.9.1",
|
|
119
119
|
"@adonisjs/ally": "6.3.0",
|
|
120
120
|
"@adonisjs/auth": "10.1.0",
|
|
121
|
-
"@adonisjs/core": "7.
|
|
121
|
+
"@adonisjs/core": "7.5.0",
|
|
122
122
|
"@adonisjs/drive": "4.0.0",
|
|
123
123
|
"@adonisjs/lucid": "22.4.2",
|
|
124
|
+
"@adonisjs/redis": "10.0.1",
|
|
124
125
|
"@adonisjs/session": "8.1.0",
|
|
125
126
|
"@adonisjs/shield": "9.0.0",
|
|
126
127
|
"@adonisjs/tsconfig": "2.0.0",
|
|
127
128
|
"@japa/assert": "4.2.0",
|
|
128
129
|
"@japa/runner": "5.3.0",
|
|
129
130
|
"@poppinss/ts-exec": "1.4.4",
|
|
130
|
-
"@
|
|
131
|
+
"@tanstack/intent": "^0.3.8",
|
|
132
|
+
"@tanstack/react-query": "5.102.8",
|
|
133
|
+
"@types/better-sqlite3": "9.6.0",
|
|
131
134
|
"@types/ioredis-mock": "8.2.8",
|
|
132
|
-
"@types/koa": "
|
|
135
|
+
"@types/koa": "3.0.3",
|
|
133
136
|
"@types/koa-mount": "4.0.5",
|
|
134
|
-
"@types/luxon": "3.7.
|
|
135
|
-
"@types/node": "
|
|
137
|
+
"@types/luxon": "3.7.5",
|
|
138
|
+
"@types/node": "26.4.0",
|
|
136
139
|
"@types/qrcode": "1.5.6",
|
|
137
|
-
"
|
|
140
|
+
"@types/react": "19.2.18",
|
|
141
|
+
"@types/react-dom": "19.2.5",
|
|
142
|
+
"@vinejs/vine": "4.4.0",
|
|
143
|
+
"@vitejs/plugin-react": "6.1.1",
|
|
144
|
+
"better-sqlite3": "13.0.3",
|
|
138
145
|
"edge.js": "6.5.1",
|
|
139
146
|
"esbuild": "0.28.2",
|
|
140
|
-
"ioredis": "
|
|
147
|
+
"ioredis": "6.0.0",
|
|
141
148
|
"ioredis-mock": "8.13.1",
|
|
142
149
|
"luxon": "3.7.2",
|
|
143
|
-
"
|
|
144
|
-
"@vinejs/vine": "4.4.0",
|
|
145
|
-
"typescript": "6.0.3",
|
|
146
|
-
"@vitejs/plugin-react": "6.0.5",
|
|
147
|
-
"@types/react": "19.2.18",
|
|
148
|
-
"@types/react-dom": "19.2.4",
|
|
150
|
+
"nuqs": "2.10.1",
|
|
149
151
|
"react": "19.2.8",
|
|
150
152
|
"react-dom": "19.2.8",
|
|
151
|
-
"
|
|
152
|
-
"@tanstack/react-query": "5.101.4",
|
|
153
|
-
"react-error-boundary": "6.1.2",
|
|
154
|
-
"nuqs": "2.9.5",
|
|
153
|
+
"react-error-boundary": "6.1.4",
|
|
155
154
|
"recharts": "3.10.1",
|
|
156
|
-
"
|
|
155
|
+
"tailwindcss": "3.4.19",
|
|
156
|
+
"typescript": "7.0.2",
|
|
157
|
+
"vite": "8.2.2"
|
|
157
158
|
},
|
|
158
159
|
"scripts": {
|
|
159
160
|
"build": "node scripts/build_host_css.mjs && node scripts/build_webauthn.mjs && node scripts/build_ui.mjs && node -e \"const fs=require('node:fs');for(const d of ['build/stubs','build/host/views'])fs.rmSync(d,{recursive:true,force:true})\" && tsc && node -e \"require('node:fs').cpSync('src/host/assets','build/src/host/assets',{recursive:true})\" && node -e \"require('node:fs').cpSync('stubs','build/stubs',{recursive:true,filter:(s)=>!s.endsWith('.ts')})\" && node -e \"const fs=require('node:fs');if(fs.existsSync('assets'))fs.cpSync('assets','build/assets',{recursive:true})\" && node -e \"require('node:fs').cpSync('src/host/views','build/host/views',{recursive:true})\" && node -e \"const fs=require('node:fs');fs.mkdirSync('build/host/ui',{recursive:true});fs.readdirSync('src/host/ui').filter(f=>f.endsWith('.html')).forEach(f=>fs.copyFileSync('src/host/ui/'+f,'build/host/ui/'+f))\" && node -e \"require('node:fs').copyFileSync('commands/commands.json','build/commands/commands.json')\" && node -e \"const fs=require('node:fs');fs.mkdirSync('build/src/password',{recursive:true});fs.copyFileSync('src/password/common_passwords.txt','build/src/password/common_passwords.txt')\"",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
exports({ to: app.makePath('inertia/components/auth_shell.tsx') });
|
|
3
3
|
}
|
|
4
|
+
|
|
4
5
|
import type { ReactNode } from 'react';
|
|
5
6
|
|
|
6
7
|
export interface AuthBrand {
|
|
@@ -18,13 +19,7 @@ const COMPANY_FALLBACK = 'Acme';
|
|
|
18
19
|
* Layout de duas colunas para as telas de autenticacao do IdP.
|
|
19
20
|
* Painel esquerdo: marca (empresa guarda-chuva + produto). Painel direito: formulario.
|
|
20
21
|
*/
|
|
21
|
-
export default function AuthShell({
|
|
22
|
-
brand,
|
|
23
|
-
children,
|
|
24
|
-
}: {
|
|
25
|
-
brand?: AuthBrand;
|
|
26
|
-
children: ReactNode;
|
|
27
|
-
}) {
|
|
22
|
+
export default function AuthShell({ brand, children }: { brand?: AuthBrand; children: ReactNode }) {
|
|
28
23
|
const accent = brand?.accent ?? '#111827';
|
|
29
24
|
const accentSoft = brand?.accentSoft ?? accent;
|
|
30
25
|
const company = brand?.company ?? COMPANY_FALLBACK;
|