Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/developers/actions/post-sign-in.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ type PostSignInEvent = {

`event.user` includes the standard [user profile](/user-management/user-data#user-profile), plus:

| Field | Description |
| ------------------------ | -------------------------------------------- |
| `hasPassword` | Whether the user has a local password |
| `ssoIdentities` | Enterprise SSO identities linked to the user |
| `mfaVerificationFactors` | MFA factor types configured for the user |
| `roles` | Global roles and their API resource scopes |
| `organizations` | Organizations the user belongs to |
| `organizationRoles` | Organization roles assigned to the user |
| Field | Description |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| `hasPassword` | Whether the user has a local password |
| `ssoIdentities` | Enterprise SSO identities linked to the user |
| `mfaVerificationFactors` | Explicitly stored MFA factor types configured for the user (`Totp`, `WebAuthn`, `BackupCode`); excludes implicit email/SMS MFA factors |
| `roles` | Global roles and their API resource scopes |
| `organizations` | Organizations the user belongs to |
| `organizationRoles` | Organization roles assigned to the user |

The context also includes fields such as `applicationId`, `lastSignInAt`, `createdAt`, and `updatedAt`. It does not include plaintext passwords, password hashes, MFA secrets, or connector token-set secrets.

Expand Down
64 changes: 48 additions & 16 deletions docs/developers/audit-logs/event-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,15 @@ Feel free to [contact us](https://logto.io/contact) if you’d like to share you
| Interaction.Register.Verification.Password.Submit | Create and verify identifier with password verification |
| Interaction.Register.Verification.EmailVerificationCode.Create | Create and send register email verification code |
| Interaction.Register.Verification.EmailVerificationCode.Submit | Verify register email verification code |
| Interaction.Register.Verification.PhoneVerificationCode.Create | Create and send register phone verification code |
| Interaction.Register.Verification.PhoneVerificationCode.Submit | Verify register phone verification code |
| Interaction.Register.Verification.SmsVerificationCode.Create | Create and send register SMS verification code |
| Interaction.Register.Verification.SmsVerificationCode.Submit | Verify register SMS verification code |
| Interaction.Register.Verification.Social.Create | Create social authentication URL |
| Interaction.Register.Verification.Social.Submit | Verify social authentication |
| Interaction.Register.Verification.EnterpriseSso.Create | Create enterprise SSO authentication URL |
| Interaction.Register.Verification.EnterpriseSso.Submit | Verify enterprise SSO authentication |
| Interaction.Register.SignInPasskey.Submit | Bind a sign-in passkey to the registering user |
| Interaction.Register.Profile.Create | Put new register interaction profile |
| Interaction.Register.Profile.Delete | Delete register interaction profile |
| Interaction.Register.Profile.Update | Patch update register interaction profile |
Expand All @@ -86,8 +89,13 @@ Feel free to [contact us](https://logto.io/contact) if you’d like to share you
| Interaction.SignIn.Identifier.VerificationCode.Submit | Submit and verify sign-in identifier with verification code |
| Interaction.SignIn.Verification.EmailVerificationCode.Create | Create and send sign-in email verification code |
| Interaction.SignIn.Verification.EmailVerificationCode.Submit | Verify sign-in email verification code |
| Interaction.SignIn.Verification.PhoneVerificationCode.Create | Create and send sign-in phone verification code |
| Interaction.SignIn.Verification.PhoneVerificationCode.Submit | Verify sign-in phone verification code |
| Interaction.SignIn.Verification.SmsVerificationCode.Create | Create and send sign-in SMS verification code |
| Interaction.SignIn.Verification.SmsVerificationCode.Submit | Verify sign-in SMS verification code |
| Interaction.SignIn.Verification.SignInPasskey.Create | Create sign-in passkey authentication options |
| Interaction.SignIn.Verification.SignInPasskey.Submit | Verify sign-in passkey authentication |
| Interaction.SignIn.SignInPasskey.Submit | Bind a sign-in passkey to the signing-in user |
| Interaction.SignIn.Identifier.Social.Create | Create social sign-in authorization-url |
| Interaction.SignIn.Identifier.Social.Submit | Authenticate and submit social identifier |
| Interaction.SignIn.Verification.Social.Create | Create social authentication URL |
Expand All @@ -113,6 +121,8 @@ Feel free to [contact us](https://logto.io/contact) if you’d like to share you
| Interaction.ForgotPassword.Identifier.VerificationCode.Submit | Submit and verify forgot-password verification code |
| Interaction.ForgotPassword.Verification.EmailVerificationCode.Create | Create and send forgot-password email verification code |
| Interaction.ForgotPassword.Verification.EmailVerificationCode.Submit | Verify forgot-password email verification code |
| Interaction.ForgotPassword.Verification.PhoneVerificationCode.Create | Create and send forgot-password phone verification code |
| Interaction.ForgotPassword.Verification.PhoneVerificationCode.Submit | Verify forgot-password phone verification code |
| Interaction.ForgotPassword.Verification.SmsVerificationCode.Create | Create and send forgot-password SMS verification code |
| Interaction.ForgotPassword.Verification.SmsVerificationCode.Submit | Verify forgot-password SMS verification code |
| Interaction.ForgotPassword.Profile.Create | Put new forgot-password interaction profile |
Expand All @@ -121,22 +131,44 @@ Feel free to [contact us](https://logto.io/contact) if you’d like to share you

## MFA \{#mfa}

| Key | Name |
| --------------------------------------------------- | ----------------------------------------------- |
| Interaction.Register.Verification.BackupCode.Create | Create backup codes for MFA binding |
| Interaction.Register.Verification.BackupCode.Submit | Verify backup code |
| Interaction.Register.Verification.Totp.Create | Create TOTP verification secret for MFA binding |
| Interaction.Register.Verification.Totp.Submit | Verify TOTP verification code |
| Interaction.Register.Verification.WebAuthn.Create | Create WebAuthn authentication |
| Interaction.Register.Verification.WebAuthn.Submit | Verify WebAuthn authentication |
| Interaction.SignIn.Verification.BackupCode.Create | Create backup codes for MFA binding |
| Interaction.SignIn.Verification.BackupCode.Submit | Verify backup code |
| Interaction.SignIn.Verification.Totp.Create | Create TOTP verification secret for MFA binding |
| Interaction.SignIn.Verification.Totp.Submit | Verify TOTP verification code |
| Interaction.SignIn.Verification.WebAuthn.Create | Create WebAuthn authentication |
| Interaction.SignIn.Verification.WebAuthn.Submit | Verify WebAuthn authentication |
| TrustedDevice.Created | Create a trusted-device credential |
| TrustedDevice.Used | Use a trusted device to fulfill sign-in MFA |
| Key | Name |
| ----------------------------------------------------------------- | -------------------------------------------------------- |
| Interaction.Register.BindMfa.BackupCode.Submit | Bind backup codes for MFA during registration |
| Interaction.Register.BindMfa.EmailVerificationCode.Submit | Bind email verification code for MFA during registration |
| Interaction.Register.BindMfa.PhoneVerificationCode.Submit | Bind phone verification code for MFA during registration |
| Interaction.Register.BindMfa.Totp.Submit | Bind TOTP for MFA during registration |
| Interaction.Register.BindMfa.WebAuthn.Submit | Bind WebAuthn passkey for MFA during registration |
| Interaction.Register.Verification.BackupCode.Create | Create backup codes for MFA binding |
| Interaction.Register.Verification.BackupCode.Submit | Verify backup code |
| Interaction.Register.Verification.MfaEmailVerificationCode.Create | Create and send register MFA email verification code |
| Interaction.Register.Verification.MfaEmailVerificationCode.Submit | Verify register MFA email verification code |
| Interaction.Register.Verification.MfaPhoneVerificationCode.Create | Create and send register MFA phone verification code |
| Interaction.Register.Verification.MfaPhoneVerificationCode.Submit | Verify register MFA phone verification code |
| Interaction.Register.Verification.Totp.Create | Create TOTP verification secret for MFA binding |
| Interaction.Register.Verification.Totp.Submit | Verify TOTP verification code |
| Interaction.Register.Verification.WebAuthn.Create | Create WebAuthn authentication |
| Interaction.Register.Verification.WebAuthn.Submit | Verify WebAuthn authentication |
| Interaction.SignIn.BindMfa.BackupCode.Submit | Bind backup codes for MFA during sign-in |
| Interaction.SignIn.BindMfa.EmailVerificationCode.Submit | Bind email verification code for MFA during sign-in |
| Interaction.SignIn.BindMfa.PhoneVerificationCode.Submit | Bind phone verification code for MFA during sign-in |
| Interaction.SignIn.BindMfa.Totp.Submit | Bind TOTP for MFA during sign-in |
| Interaction.SignIn.BindMfa.WebAuthn.Submit | Bind WebAuthn passkey for MFA during sign-in |
| Interaction.SignIn.Verification.BackupCode.Create | Create backup codes for MFA binding |
| Interaction.SignIn.Verification.BackupCode.Submit | Verify backup code |
| Interaction.SignIn.Verification.MfaEmailVerificationCode.Create | Create and send sign-in MFA email verification code |
| Interaction.SignIn.Verification.MfaEmailVerificationCode.Submit | Verify sign-in MFA email verification code |
| Interaction.SignIn.Verification.MfaPhoneVerificationCode.Create | Create and send sign-in MFA phone verification code |
| Interaction.SignIn.Verification.MfaPhoneVerificationCode.Submit | Verify sign-in MFA phone verification code |
| Interaction.SignIn.Verification.Totp.Create | Create TOTP verification secret for MFA binding |
| Interaction.SignIn.Verification.Totp.Submit | Verify TOTP verification code |
| Interaction.SignIn.Verification.WebAuthn.Create | Create WebAuthn authentication |
| Interaction.SignIn.Verification.WebAuthn.Submit | Verify WebAuthn authentication |
| TrustedDevice.Created | Create a trusted-device credential |
| TrustedDevice.Used | Use a trusted device to fulfill sign-in MFA |

:::note
`MfaEmailVerificationCode` and `MfaPhoneVerificationCode` verification keys are defined in Logto's audit log schema (`LogKey`), while at runtime the Experience API MFA verification-code endpoints currently log `Interaction.{event}.Verification.EmailVerificationCode.{Create,Submit}` and `Interaction.{event}.Verification.PhoneVerificationCode.{Create,Submit}`.
:::

## SAML application \{#saml-application}

Expand Down
59 changes: 59 additions & 0 deletions docs/developers/custom-token-claims/create-script.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,65 @@ The context object contains the user data and grant data that relevant to the cu
}
```

```ts
// VerificationType.SignInPasskey
{
id: string;
type: 'SignInPasskey';
userId?: string;
verified: boolean;
registrationRpId?: string;
}
```

```ts
// VerificationType.MfaEmailVerificationCode
{
id: string;
type: 'MfaEmailVerificationCode';
templateType:
| 'MfaVerification'
| 'BindMfa'
| 'SignIn'
| 'Register'
| 'ForgotPassword'
| 'OrganizationInvitation'
| 'Generic'
| 'UserPermissionValidation'
| 'BindNewIdentifier';
verified: boolean;
userId?: string;
identifier: {
type: 'email';
value: string;
};
}
```

```ts
// VerificationType.MfaPhoneVerificationCode
{
id: string;
type: 'MfaPhoneVerificationCode';
templateType:
| 'MfaVerification'
| 'BindMfa'
| 'SignIn'
| 'Register'
| 'ForgotPassword'
| 'OrganizationInvitation'
| 'Generic'
| 'UserPermissionValidation'
| 'BindNewIdentifier';
verified: boolean;
userId?: string;
identifier: {
type: 'phone';
value: string;
};
}
```

```ts
// VerificationType.BackupCode (MFA)
{
Expand Down
11 changes: 6 additions & 5 deletions docs/developers/webhooks/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ This guide list the different Logto webhook events and explains when each event

## User interaction webhook events \{#user-interaction-hook-events}

| Event type | Description |
| ----------------- | --------------------------------------------------------------------------- |
| PostRegister | A user successfully creates a new account via the UI interface. |
| PostSignIn | A user successfully signs in via the UI interface. |
| PostResetPassword | A user's password is successfully reset through the "Forgot password" flow. |
| Event type | Description |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| PostRegister | A user successfully creates a new account via the UI interface. |
| PostSignIn | A user successfully signs in via the UI interface. |
| PostSignInAdaptiveMfaTriggered | [Adaptive MFA](/end-user-flows/mfa/adaptive-mfa) triggers an MFA challenge during a sign-in flow (emitted before MFA verification finishes). |
| PostResetPassword | A user's password is successfully reset through the "Forgot password" flow. |

## Data mutation webhook events \{#data-mutation-hook-events}

Expand Down
Loading
Loading