authhero 9.31.0 → 9.33.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/dist/assets/u/widget/index.esm.js +1 -1
- package/dist/authhero.cjs +73 -73
- package/dist/authhero.d.ts +613 -432
- package/dist/authhero.mjs +10990 -10763
- package/dist/mfa-attempts-DNgUKmta.js +275 -0
- package/dist/{mfa-attempts-Dl3I8pop.mjs → mfa-attempts-dhkGMzI5.mjs} +6263 -5839
- package/dist/{passkey-enrollment-2Toeaevy.js → passkey-enrollment-B_o8pQ1z.js} +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/authentication-flows/common.d.ts +12 -1
- package/dist/types/authentication-flows/passwordless.d.ts +17 -6
- package/dist/types/authentication-flows/refresh-token.d.ts +1 -0
- package/dist/types/helpers/cimd.d.ts +8 -0
- package/dist/types/helpers/client.d.ts +17 -1
- package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
- package/dist/types/helpers/login-session-tenant.d.ts +22 -0
- package/dist/types/helpers/reserved-claims.d.ts +2 -2
- package/dist/types/helpers/session-transfer.d.ts +158 -0
- package/dist/types/hooks/lifecycle-codehooks.d.ts +2 -2
- package/dist/types/index.d.ts +552 -422
- package/dist/types/routes/auth-api/account.d.ts +2 -2
- package/dist/types/routes/auth-api/authorize.d.ts +6 -0
- package/dist/types/routes/auth-api/index.d.ts +42 -25
- package/dist/types/routes/auth-api/oidc-logout.d.ts +3 -3
- package/dist/types/routes/auth-api/passwordless.d.ts +8 -8
- package/dist/types/routes/auth-api/register/index.d.ts +2 -2
- package/dist/types/routes/auth-api/token.d.ts +21 -10
- package/dist/types/routes/management-api/action-triggers.d.ts +27 -27
- package/dist/types/routes/management-api/actions.d.ts +13 -13
- package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
- package/dist/types/routes/management-api/branding.d.ts +19 -19
- package/dist/types/routes/management-api/clients.d.ts +86 -18
- package/dist/types/routes/management-api/connections.d.ts +9 -9
- package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
- package/dist/types/routes/management-api/email-templates.d.ts +18 -18
- package/dist/types/routes/management-api/emails.d.ts +6 -6
- package/dist/types/routes/management-api/failed-events.d.ts +2 -2
- package/dist/types/routes/management-api/flows.d.ts +8 -8
- package/dist/types/routes/management-api/forms.d.ts +144 -144
- package/dist/types/routes/management-api/guardian.d.ts +5 -5
- package/dist/types/routes/management-api/hooks.d.ts +56 -56
- package/dist/types/routes/management-api/index.d.ts +512 -399
- package/dist/types/routes/management-api/jobs.d.ts +2 -2
- package/dist/types/routes/management-api/keys.d.ts +4 -4
- package/dist/types/routes/management-api/logs.d.ts +4 -4
- package/dist/types/routes/management-api/migration-sources.d.ts +6 -6
- package/dist/types/routes/management-api/organizations.d.ts +1 -1
- package/dist/types/routes/management-api/prompts.d.ts +8 -8
- package/dist/types/routes/management-api/refresh_tokens.d.ts +5 -0
- package/dist/types/routes/management-api/resource-servers.d.ts +8 -8
- package/dist/types/routes/management-api/roles.d.ts +1 -1
- package/dist/types/routes/management-api/rollouts.d.ts +6 -6
- package/dist/types/routes/management-api/sessions.d.ts +5 -0
- package/dist/types/routes/management-api/tenant-members.d.ts +8 -8
- package/dist/types/routes/management-api/tenant-operations.d.ts +9 -9
- package/dist/types/routes/management-api/tenants.d.ts +6 -6
- package/dist/types/routes/management-api/themes.d.ts +9 -9
- package/dist/types/routes/management-api/users.d.ts +45 -15
- package/dist/types/routes/saml/index.d.ts +6 -6
- package/dist/types/routes/saml/samlp.d.ts +6 -6
- package/dist/types/routes/universal-login/common.d.ts +45 -18
- package/dist/types/routes/universal-login/flow-api.d.ts +12 -12
- package/dist/types/routes/universal-login/impersonate.d.ts +2 -2
- package/dist/types/routes/universal-login/index.d.ts +2 -2
- package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
- package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
- package/dist/types/state-machines/login-session.d.ts +3 -1
- package/dist/types/types/GrantFlowResult.d.ts +13 -0
- package/dist/types/types/Hooks.d.ts +24 -0
- package/dist/types/types/Variables.d.ts +12 -1
- package/dist/types/utils/cookies.d.ts +15 -0
- package/dist/types/utils/session-transfer-token.d.ts +56 -0
- package/package.json +6 -6
- package/dist/mfa-attempts-DXiY4U74.js +0 -275
|
@@ -27,7 +27,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
27
27
|
output: {
|
|
28
28
|
screen: {
|
|
29
29
|
action: string;
|
|
30
|
-
method: "
|
|
30
|
+
method: "GET" | "POST";
|
|
31
31
|
components: {
|
|
32
32
|
id: string;
|
|
33
33
|
type: string;
|
|
@@ -43,7 +43,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
43
43
|
hint?: string | undefined;
|
|
44
44
|
messages?: {
|
|
45
45
|
text: string;
|
|
46
|
-
type: "
|
|
46
|
+
type: "error" | "success" | "info" | "warning";
|
|
47
47
|
id?: number | undefined;
|
|
48
48
|
}[] | undefined;
|
|
49
49
|
}[];
|
|
@@ -51,7 +51,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
51
51
|
description?: string | undefined;
|
|
52
52
|
messages?: {
|
|
53
53
|
text: string;
|
|
54
|
-
type: "
|
|
54
|
+
type: "error" | "success" | "info" | "warning";
|
|
55
55
|
id?: number | undefined;
|
|
56
56
|
}[] | undefined;
|
|
57
57
|
links?: {
|
|
@@ -107,7 +107,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
107
107
|
output: {
|
|
108
108
|
screen: {
|
|
109
109
|
action: string;
|
|
110
|
-
method: "
|
|
110
|
+
method: "GET" | "POST";
|
|
111
111
|
components: {
|
|
112
112
|
id: string;
|
|
113
113
|
type: string;
|
|
@@ -123,7 +123,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
123
123
|
hint?: string | undefined;
|
|
124
124
|
messages?: {
|
|
125
125
|
text: string;
|
|
126
|
-
type: "
|
|
126
|
+
type: "error" | "success" | "info" | "warning";
|
|
127
127
|
id?: number | undefined;
|
|
128
128
|
}[] | undefined;
|
|
129
129
|
}[];
|
|
@@ -131,7 +131,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
131
131
|
description?: string | undefined;
|
|
132
132
|
messages?: {
|
|
133
133
|
text: string;
|
|
134
|
-
type: "
|
|
134
|
+
type: "error" | "success" | "info" | "warning";
|
|
135
135
|
id?: number | undefined;
|
|
136
136
|
}[] | undefined;
|
|
137
137
|
links?: {
|
|
@@ -204,7 +204,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
204
204
|
output: {
|
|
205
205
|
screen: {
|
|
206
206
|
action: string;
|
|
207
|
-
method: "
|
|
207
|
+
method: "GET" | "POST";
|
|
208
208
|
components: {
|
|
209
209
|
id: string;
|
|
210
210
|
type: string;
|
|
@@ -220,7 +220,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
220
220
|
hint?: string | undefined;
|
|
221
221
|
messages?: {
|
|
222
222
|
text: string;
|
|
223
|
-
type: "
|
|
223
|
+
type: "error" | "success" | "info" | "warning";
|
|
224
224
|
id?: number | undefined;
|
|
225
225
|
}[] | undefined;
|
|
226
226
|
}[];
|
|
@@ -228,7 +228,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
228
228
|
description?: string | undefined;
|
|
229
229
|
messages?: {
|
|
230
230
|
text: string;
|
|
231
|
-
type: "
|
|
231
|
+
type: "error" | "success" | "info" | "warning";
|
|
232
232
|
id?: number | undefined;
|
|
233
233
|
}[] | undefined;
|
|
234
234
|
links?: {
|
|
@@ -319,7 +319,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
319
319
|
output: {
|
|
320
320
|
screen: {
|
|
321
321
|
action: string;
|
|
322
|
-
method: "
|
|
322
|
+
method: "GET" | "POST";
|
|
323
323
|
components: {
|
|
324
324
|
id: string;
|
|
325
325
|
type: string;
|
|
@@ -335,7 +335,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
335
335
|
hint?: string | undefined;
|
|
336
336
|
messages?: {
|
|
337
337
|
text: string;
|
|
338
|
-
type: "
|
|
338
|
+
type: "error" | "success" | "info" | "warning";
|
|
339
339
|
id?: number | undefined;
|
|
340
340
|
}[] | undefined;
|
|
341
341
|
}[];
|
|
@@ -343,7 +343,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
|
|
|
343
343
|
description?: string | undefined;
|
|
344
344
|
messages?: {
|
|
345
345
|
text: string;
|
|
346
|
-
type: "
|
|
346
|
+
type: "error" | "success" | "info" | "warning";
|
|
347
347
|
id?: number | undefined;
|
|
348
348
|
}[] | undefined;
|
|
349
349
|
links?: {
|
|
@@ -13,7 +13,7 @@ export declare const impersonateRoutes: OpenAPIHono<{
|
|
|
13
13
|
};
|
|
14
14
|
output: {};
|
|
15
15
|
outputFormat: string;
|
|
16
|
-
status:
|
|
16
|
+
status: 400;
|
|
17
17
|
} | {
|
|
18
18
|
input: {
|
|
19
19
|
query: {
|
|
@@ -22,7 +22,7 @@ export declare const impersonateRoutes: OpenAPIHono<{
|
|
|
22
22
|
};
|
|
23
23
|
output: {};
|
|
24
24
|
outputFormat: string;
|
|
25
|
-
status:
|
|
25
|
+
status: 200;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
} & {
|
|
@@ -126,7 +126,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
126
126
|
};
|
|
127
127
|
output: {};
|
|
128
128
|
outputFormat: string;
|
|
129
|
-
status:
|
|
129
|
+
status: 400;
|
|
130
130
|
} | {
|
|
131
131
|
input: {
|
|
132
132
|
query: {
|
|
@@ -135,7 +135,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
135
135
|
};
|
|
136
136
|
output: {};
|
|
137
137
|
outputFormat: string;
|
|
138
|
-
status:
|
|
138
|
+
status: 200;
|
|
139
139
|
};
|
|
140
140
|
};
|
|
141
141
|
} & {
|
|
@@ -165,7 +165,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
165
165
|
$get: {
|
|
166
166
|
input: {
|
|
167
167
|
param: {
|
|
168
|
-
screen: "
|
|
168
|
+
screen: "signup" | "account" | "reset-password" | "login" | "enter-password" | "impersonate" | "consent" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
|
|
169
169
|
};
|
|
170
170
|
} & {
|
|
171
171
|
query: {
|
|
@@ -181,7 +181,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
181
181
|
} | {
|
|
182
182
|
input: {
|
|
183
183
|
param: {
|
|
184
|
-
screen: "
|
|
184
|
+
screen: "signup" | "account" | "reset-password" | "login" | "enter-password" | "impersonate" | "consent" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
|
|
185
185
|
};
|
|
186
186
|
} & {
|
|
187
187
|
query: {
|
|
@@ -197,7 +197,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
197
197
|
} | {
|
|
198
198
|
input: {
|
|
199
199
|
param: {
|
|
200
|
-
screen: "
|
|
200
|
+
screen: "signup" | "account" | "reset-password" | "login" | "enter-password" | "impersonate" | "consent" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
|
|
201
201
|
};
|
|
202
202
|
} & {
|
|
203
203
|
query: {
|
|
@@ -217,7 +217,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
217
217
|
$post: {
|
|
218
218
|
input: {
|
|
219
219
|
param: {
|
|
220
|
-
screen: "
|
|
220
|
+
screen: "signup" | "reset-password" | "login" | "enter-password" | "impersonate" | "consent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
|
|
221
221
|
};
|
|
222
222
|
} & {
|
|
223
223
|
query: {
|
|
@@ -235,7 +235,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
|
|
|
235
235
|
} | {
|
|
236
236
|
input: {
|
|
237
237
|
param: {
|
|
238
|
-
screen: "
|
|
238
|
+
screen: "signup" | "reset-password" | "login" | "enter-password" | "impersonate" | "consent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
|
|
239
239
|
};
|
|
240
240
|
} & {
|
|
241
241
|
query: {
|
|
@@ -170,7 +170,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
170
170
|
$get: {
|
|
171
171
|
input: {
|
|
172
172
|
param: {
|
|
173
|
-
screen: "
|
|
173
|
+
screen: "signup" | "account" | "reset-password" | "login" | "enter-password" | "impersonate" | "consent" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
|
|
174
174
|
};
|
|
175
175
|
} & {
|
|
176
176
|
query: {
|
|
@@ -186,7 +186,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
186
186
|
} | {
|
|
187
187
|
input: {
|
|
188
188
|
param: {
|
|
189
|
-
screen: "
|
|
189
|
+
screen: "signup" | "account" | "reset-password" | "login" | "enter-password" | "impersonate" | "consent" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
|
|
190
190
|
};
|
|
191
191
|
} & {
|
|
192
192
|
query: {
|
|
@@ -202,7 +202,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
202
202
|
} | {
|
|
203
203
|
input: {
|
|
204
204
|
param: {
|
|
205
|
-
screen: "
|
|
205
|
+
screen: "signup" | "account" | "reset-password" | "login" | "enter-password" | "impersonate" | "consent" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
|
|
206
206
|
};
|
|
207
207
|
} & {
|
|
208
208
|
query: {
|
|
@@ -222,7 +222,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
222
222
|
$post: {
|
|
223
223
|
input: {
|
|
224
224
|
param: {
|
|
225
|
-
screen: "
|
|
225
|
+
screen: "signup" | "reset-password" | "login" | "enter-password" | "impersonate" | "consent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
|
|
226
226
|
};
|
|
227
227
|
} & {
|
|
228
228
|
query: {
|
|
@@ -240,7 +240,7 @@ export declare const u2Routes: OpenAPIHono<{
|
|
|
240
240
|
} | {
|
|
241
241
|
input: {
|
|
242
242
|
param: {
|
|
243
|
-
screen: "
|
|
243
|
+
screen: "signup" | "reset-password" | "login" | "enter-password" | "impersonate" | "consent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
|
|
244
244
|
};
|
|
245
245
|
} & {
|
|
246
246
|
query: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type PasswordResetFlow } from "./password-reset";
|
|
2
2
|
import { LoginSession, LoginSessionState } from "@authhero/adapter-interfaces";
|
|
3
3
|
import type { SessionCookieDiagnostics } from "../utils/cookies";
|
|
4
|
+
import type { SessionTransferCarrierState } from "../helpers/session-transfer";
|
|
4
5
|
export interface MfaRequiredByAction {
|
|
5
6
|
/** The provider the (last enabling) action passed, e.g. "any". */
|
|
6
7
|
provider: string;
|
|
@@ -48,6 +49,7 @@ export interface LoginSessionData {
|
|
|
48
49
|
};
|
|
49
50
|
try_connection_result?: unknown;
|
|
50
51
|
session_cookie?: SessionCookieDiagnostics;
|
|
52
|
+
session_transfer?: SessionTransferCarrierState;
|
|
51
53
|
}
|
|
52
54
|
/** The on-disk JSON shape stays flat for compatibility with existing sessions. */
|
|
53
55
|
export declare function readLoginSessionData(raw?: string | null): LoginSessionData;
|
|
@@ -229,7 +231,7 @@ export declare const loginSessionMachine: import("xstate").StateMachine<LoginSes
|
|
|
229
231
|
}, {
|
|
230
232
|
type: "passwordResetRequested";
|
|
231
233
|
params: unknown;
|
|
232
|
-
}, never, "
|
|
234
|
+
}, never, "pending" | "failed" | "expired" | "authenticated" | "awaiting_email_verification" | "awaiting_mfa" | "awaiting_consent" | "awaiting_hook" | "awaiting_continuation" | "completed", string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
233
235
|
id: "loginSession";
|
|
234
236
|
states: {
|
|
235
237
|
readonly pending: {};
|
|
@@ -24,6 +24,19 @@ export interface GrantFlowResult {
|
|
|
24
24
|
auth_time?: number;
|
|
25
25
|
/** The connection name used for authentication (e.g., "email", "google-oauth2") */
|
|
26
26
|
authConnection?: string;
|
|
27
|
+
authStrategy?: {
|
|
28
|
+
strategy: string;
|
|
29
|
+
strategy_type: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Set when the refresh-token grant was asked for a session_transfer_token
|
|
33
|
+
* (`audience=urn:{domain}:session_transfer`). The token endpoint returns
|
|
34
|
+
* `token` in place of an access token; `audience` is what the request named.
|
|
35
|
+
*/
|
|
36
|
+
session_transfer?: {
|
|
37
|
+
token: string;
|
|
38
|
+
audience: string;
|
|
39
|
+
};
|
|
27
40
|
}
|
|
28
41
|
export interface GrantFlowUserResult extends GrantFlowResult {
|
|
29
42
|
user: User;
|
|
@@ -111,6 +111,30 @@ export type HookEvent = {
|
|
|
111
111
|
last_ip?: string;
|
|
112
112
|
last_user_agent?: string;
|
|
113
113
|
};
|
|
114
|
+
/**
|
|
115
|
+
* Present when the session was created by redeeming a
|
|
116
|
+
* session_transfer_token. `parent_refresh_token.id` is the rotation family
|
|
117
|
+
* of the refresh token the token was minted from.
|
|
118
|
+
*/
|
|
119
|
+
session_transfer?: {
|
|
120
|
+
client_id: string;
|
|
121
|
+
parent_refresh_token: {
|
|
122
|
+
id: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Present on the login that redeemed a session_transfer_token. `client_id`
|
|
128
|
+
* is the client that minted it and `request` describes the minting request.
|
|
129
|
+
*/
|
|
130
|
+
session_transfer_token?: {
|
|
131
|
+
client_id: string;
|
|
132
|
+
scope?: string;
|
|
133
|
+
request: {
|
|
134
|
+
ip: string;
|
|
135
|
+
asn?: string;
|
|
136
|
+
user_agent?: string;
|
|
137
|
+
};
|
|
114
138
|
};
|
|
115
139
|
security_context?: {
|
|
116
140
|
ja3?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataAdapters, LoginSession, RequestAuth } from "@authhero/adapter-interfaces";
|
|
1
|
+
import { DataAdapters, LoginSession, RequestAuth, SessionTransferProvenance } from "@authhero/adapter-interfaces";
|
|
2
2
|
import { CountryCode } from "libphonenumber-js";
|
|
3
3
|
import { Auth0Client } from "./Auth0Client";
|
|
4
4
|
import type { PreferState } from "../middlewares/prefer";
|
|
@@ -80,4 +80,15 @@ export type Variables = {
|
|
|
80
80
|
dur: number;
|
|
81
81
|
}[];
|
|
82
82
|
is_lazy_migration?: boolean;
|
|
83
|
+
client_id_from_token?: boolean;
|
|
84
|
+
session_transfer_token?: {
|
|
85
|
+
client_id: string;
|
|
86
|
+
scope?: string;
|
|
87
|
+
request: {
|
|
88
|
+
ip: string;
|
|
89
|
+
asn?: string;
|
|
90
|
+
user_agent?: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
session_transfer?: SessionTransferProvenance;
|
|
83
94
|
};
|
|
@@ -78,3 +78,18 @@ export declare function getPrivateBrowsingCookie(cookieHeaders?: string): boolea
|
|
|
78
78
|
*/
|
|
79
79
|
export declare function getLastUsedConnectionCookie(tenant_id: string, cookieHeaders?: string): string | undefined;
|
|
80
80
|
export declare function serializeLastUsedConnectionCookie(tenant_id: string, connectionName: string, hostname?: string): string;
|
|
81
|
+
/**
|
|
82
|
+
* The session_transfer_token an application placed in the
|
|
83
|
+
* `auth0_session_transfer_token` cookie before sending the browser to
|
|
84
|
+
* /authorize (Auth0 "Native to Web SSO"). AuthHero never sets this cookie; the
|
|
85
|
+
* application does, on a domain it shares with the tenant.
|
|
86
|
+
*/
|
|
87
|
+
export declare function getSessionTransferCookie(cookieHeaders?: string): string | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Expire the session transfer cookie once it has been presented. The token is
|
|
90
|
+
* single-use, so leaving it in the jar only makes every later /authorize log a
|
|
91
|
+
* failed transfer. The application chose the cookie's scope, which the request
|
|
92
|
+
* does not reveal, so both the host-only and the parent-domain variant are
|
|
93
|
+
* cleared. Returns Set-Cookie header values.
|
|
94
|
+
*/
|
|
95
|
+
export declare function clearSessionTransferCookie(hostname?: string): string[];
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The wire-level pieces of a session_transfer_token (#1710, Auth0 "Native to
|
|
3
|
+
* Web SSO"). Everything here is pure: no request context and no data adapters,
|
|
4
|
+
* so the logging helper can import it without a cycle.
|
|
5
|
+
*/
|
|
6
|
+
/** `issued_token_type` of the exchange response. */
|
|
7
|
+
export declare const SESSION_TRANSFER_TOKEN_TYPE = "urn:auth0:params:oauth:token-type:session_transfer_token";
|
|
8
|
+
/** Query parameter that carries the token to /authorize. */
|
|
9
|
+
export declare const SESSION_TRANSFER_TOKEN_PARAM = "session_transfer_token";
|
|
10
|
+
/** Cookie that carries the token to /authorize. */
|
|
11
|
+
export declare const SESSION_TRANSFER_COOKIE_NAME = "auth0_session_transfer_token";
|
|
12
|
+
/** A token is valid for one minute and works once. */
|
|
13
|
+
export declare const SESSION_TRANSFER_TOKEN_TTL_SECONDS = 60;
|
|
14
|
+
/** `codes.code_type` of the stored token. */
|
|
15
|
+
export declare const SESSION_TRANSFER_CODE_TYPE = "session_transfer_token";
|
|
16
|
+
/**
|
|
17
|
+
* Header in which an authenticated confidential client with
|
|
18
|
+
* `session_transfer.trust_forwarded_ip` passes the end user's IP address.
|
|
19
|
+
*/
|
|
20
|
+
export declare const SESSION_TRANSFER_FORWARDED_IP_HEADER = "auth0-forwarded-for";
|
|
21
|
+
/**
|
|
22
|
+
* A refresh-token exchange asks for a session_transfer_token by naming the
|
|
23
|
+
* audience `urn:{tenantDomain}:session_transfer`. The domain is not compared:
|
|
24
|
+
* the token is tenant-scoped and a tenant can be reached on several domains.
|
|
25
|
+
*/
|
|
26
|
+
export declare function isSessionTransferAudience(audience: string | undefined): audience is string;
|
|
27
|
+
/** A fresh opaque token: 256 bits from the CSPRNG, base64url. */
|
|
28
|
+
export declare function generateSessionTransferToken(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Only the SHA-256 of a token is stored, as the `code_id` it is looked up by,
|
|
31
|
+
* so a database read does not yield usable tokens.
|
|
32
|
+
*/
|
|
33
|
+
export declare function hashSessionTransferToken(token: string): Promise<string>;
|
|
34
|
+
/**
|
|
35
|
+
* Remove the session_transfer_token from a URL before it is stored or handed
|
|
36
|
+
* to a hook, log or log stream: the parameter itself, and a `request`
|
|
37
|
+
* parameter whose Request Object carries the token. The token is a bearer
|
|
38
|
+
* credential for a session; a URL that never contained it is returned
|
|
39
|
+
* untouched.
|
|
40
|
+
*/
|
|
41
|
+
export declare function stripSessionTransferToken(url: string): string;
|
|
42
|
+
export declare function stripSessionTransferToken(url: string | undefined): string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Replace the token in a parsed query-string record (as logged with a request)
|
|
45
|
+
* with a placeholder: the parameter itself, and a `request` parameter whose
|
|
46
|
+
* Request Object carries the token. Returns the input when neither is there.
|
|
47
|
+
*/
|
|
48
|
+
export declare function redactSessionTransferQuery<T>(query: Record<string, T>): Record<string, T | string>;
|
|
49
|
+
/**
|
|
50
|
+
* Canonical text form of an IP address, or undefined when the value is not
|
|
51
|
+
* one. Device binding compares canonical forms so the same address spelled two
|
|
52
|
+
* ways (`::FFFF:192.0.2.1` and `192.0.2.1`, upper and lower case hex, zero
|
|
53
|
+
* compression) still matches, and so a forwarded header cannot smuggle
|
|
54
|
+
* anything that is not an address into the stored record.
|
|
55
|
+
*/
|
|
56
|
+
export declare function normalizeIp(value: string | undefined): string | undefined;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "https://github.com/sesamyab/authhero"
|
|
13
13
|
},
|
|
14
|
-
"version": "9.
|
|
14
|
+
"version": "9.33.0",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"vite": "^8.0.14",
|
|
64
64
|
"vite-plugin-dts": "^4.5.4",
|
|
65
65
|
"vitest": "^4.1.7",
|
|
66
|
-
"@authhero/
|
|
67
|
-
"@authhero/
|
|
66
|
+
"@authhero/widget": "0.41.12",
|
|
67
|
+
"@authhero/kysely-adapter": "12.20.0"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@peculiar/x509": "^1.14.3",
|
|
@@ -81,9 +81,9 @@
|
|
|
81
81
|
"qrcode": "^1.5.4",
|
|
82
82
|
"sanitize-html": "^2.17.4",
|
|
83
83
|
"xstate": "^5.31.1",
|
|
84
|
-
"@authhero/adapter-interfaces": "4.
|
|
85
|
-
"@authhero/
|
|
86
|
-
"@authhero/
|
|
84
|
+
"@authhero/adapter-interfaces": "4.28.0",
|
|
85
|
+
"@authhero/saml": "0.6.8",
|
|
86
|
+
"@authhero/proxy": "0.11.15"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"@authhero/widget": ">=0.38.9",
|