Webhook 이벤트
이 가이드에서는 다양한 Logto Webhook 이벤트를 나열하고 각 이벤트가 발생하는 시점을 설명합니다.
사용자 상호작용 Webhook 이벤트
| 이벤트 유형 | 설명 |
|---|---|
| PostRegister | 사용자가 UI 인터페이스를 통해 새 계정을 성공적으로 생성했을 때 발생합니다. |
| PostSignIn | 사용자가 UI 인터페이스를 통해 성공적으로 로그인했을 때 발생합니다. |
| PostResetPassword | 사용자가 "비밀번호 찾기" 플로우를 통해 비밀번호를 성공적으로 재설정했을 때 발생합니다. |
데이터 변경 Webhook 이벤트
사용자
| 이벤트 유형 | 설명 |
|---|---|
| User.Created | 새 사용자 계정이 생성되었습니다. |
| User.Deleted | 사용자 계정이 삭제되었습니다. |
| User.Data.Updated | 사용자 프로필 데이터가 업데이트되었습니다. 예: 이메일, 아바타, custom.data, 소셜 식별자 등. |
| User.SuspensionStatus.Updated | 사용자 정지 상태가 변경되었습니다 (정지 또는 재활성화). |
역할(Role)
| 이벤트 유형 | 설명 |
|---|---|
| Role.Created | 새 역할이 생성되었습니다. |
| Role.Deleted | 역할이 삭제되었습니다. |
| Role.Data.Updated | 역할 데이터가 업데이트되었습니다. 예: 역할 이름, 설명, 기본 역할 상태 등. |
| Role.Scopes.Updated | 역할에 할당된 권한이 추가되거나 제거되었습니다. |
권한(Permission, Scope)
| 이벤트 유형 | 설명 |
|---|---|
| Scope.Created | 새 API 권한이 생성되었습니다. |
| Scope.Deleted | API 권한이 삭제되었습니다. |
| Scope.Data.Updated | API 권한 데이터가 업데이트되었습니다. 예: 권한 설명 등. |
조직(Organization)
| 이벤트 유형 | 설명 |
|---|---|
| Organization.Created | 새 조직이 생성되었습니다. |
| Organization.Deleted | 조직이 삭제되었습니다. |
| Organization.Data.Updated | 조직 데이터가 업데이트되었습니다. 예: 조직 이름, 설명, custom.data 등. |
| Organization.Membership.Updated | 사용자 또는 애플리케이션이 조직에 추가되거나 제거되었습니다. 페이로드에는 멤버십 델타 필드가 포함됩니다. |
조직 역할(Organization role)
| 이벤트 유형 | 설명 |
|---|---|
| OrganizationRole.Created | 새 조직 역할이 생성되었습니다. |
| OrganizationRole.Deleted | 조직 역할이 삭제되었습니다. |
| OrganizationRole.Data.Updated | 조직 역할 데이터가 업데이트되었습니다. 예: 조직 역할 이름, 설명 등. |
| OrganizationRole.Scopes.Updated | 조직 역할에 할당된 권한이 추가되거나 제거되었습니다. |
조직 권한(Organization permission, scope)
| 이벤트 유형 | 설명 |
|---|---|
| OrganizationScope.Created | 새 조직 권한이 생성되었습니다. |
| OrganizationScope.Deleted | 조직 권한이 삭제되었습니다. |
| OrganizationScope.Data.Updated | 조직 권한 데이터가 업데이트되었습니다. 예: 조직 권한 설명 등. |
신뢰된 기기(Trusted device)
| 이벤트 유형 | 설명 |
|---|---|
| TrustedDevice.Created | 인증 (Authentication) 상호작용이 성공적으로 완료된 후 신뢰된 기기 레코드가 생성됩니다. |
| TrustedDevice.Deleted | 사용자 또는 관리자가 신뢰된 기기 레코드를 제거합니다. |
자연 만료는 TrustedDevice.Expired webhook을 발생시키지 않습니다. 만료는 애플리케이션 변경이 아닌 시간 기반 유효성 변경이기 때문입니다. TrustedDevice.Created 페이로드에는 expiresAt이 포함되어 있어, 소비자가 예상 만료 시간을 파악할 수 있습니다. 성공적인 사용 및 신뢰된 기기 정책 변경은 라이프사이클 webhook을 발생시키지 않습니다.
Management API 트리거 이벤트
| API 엔드포인트 | 이벤트 |
|---|---|
| POST /users | User.Created |
| DELETE /users/:userId | User.Deleted |
| PATCH /users/:userId | User.Data.Updated |
| PATCH /users/:userId/custom-data | User.Data.Updated |
| PATCH /users/:userId/profile | User.Data.Updated |
| PATCH /users/:userId/password | User.Data.Updated |
| PATCH /users/:userId/is-suspended | User.SuspensionStatus.Updated |
| POST /roles | Role.Created, (Role.Scopes.Update) |
| DELETE /roles/:id | Role.Deleted |
| PATCH /roles/:id | Role.Data.Updated |
| POST /roles/:id/scopes | Role.Scopes.Updated |
| DELETE /roles/:id/scopes/:scopeId | Role.Scopes.Updated |
| POST /resources/:resourceId/scopes | Scope.Created |
| DELETE /resources/:resourceId/scopes/:scopeId | Scope.Deleted |
| PATCH /resources/:resourceId/scopes/:scopeId | Scope.Data.Updated |
| POST /organizations | Organization.Created |
| DELETE /organizations/:id | Organization.Deleted |
| PATCH /organizations/:id | Organization.Data.Updated |
| PUT /organizations/:id/users | Organization.Membership.Updated |
| POST /organizations/:id/users | Organization.Membership.Updated |
| DELETE /organizations/:id/users/:userId | Organization.Membership.Updated |
| PUT /organizations/:id/applications | Organization.Membership.Updated |
| POST /organizations/:id/applications | Organization.Membership.Updated |
| DELETE /organizations/:id/applications/:applicationId | Organization.Membership.Updated |
| PUT /organization-invitations/:id/status (Accepted) | Organization.Membership.Updated |
| POST /organization-roles | OrganizationRole.Created, (OrganizationRole.Scopes.Updated) |
| DELETE /organization-roles/:id | OrganizationRole.Deleted |
| PATCH /organization-roles/:id | OrganizationRole.Data.Updated |
| POST /organization-scopes | OrganizationScope.Created |
| DELETE /organization-scopes/:id | OrganizationScope.Deleted |
| PATCH /organization-scopes/:id | OrganizationScope.Data.Updated |
| PUT /organization-roles/:id/scopes | OrganizationRole.Scopes.Updated |
| POST /organization-roles/:id/scopes | OrganizationRole.Scopes.Updated |
| DELETE /organization-roles/:id/scopes/:organizationScopeId | OrganizationRole.Scopes.Updated |
Experience API 트리거 이벤트
| 사용자 상호작용 동작 | 이벤트 |
|---|---|
| 사용자 이메일/전화번호 연결 | User.Data.Updated |
| 사용자 MFA 연결 | User.Data.Updated |
| 사용자 소셜/SSO 연결 | User.Data.Updated |
| 사용자 비밀번호 재설정 | User.Data.Updated |
| 사용자 등록 | User.Created |
| Just-in-time 프로비저닝 (이메일 도메인 또는 엔터프라이즈 SSO 커넥터 일치)로 조직에 자동 프로비저닝 | Organization.Membership.Updated |
예외 Webhook 이벤트
보안(Security)
| 이벤트 유형 | 설명 |
|---|---|
| Identifier.Lockout | 연속된 아이덴티티 검증 실패로 인해 사용자 계정이 잠깁니다. 다음 플로우에서 트리거될 수 있습니다:
|
| Message.RateLimited | 최종 사용자가 인증 코드에 대한 수신자별 전송 속도 제한을 초과했습니다. 최종 사용자 전송 경로 (Experience API 및 Account API)에서만 발생하며, 페이로드는 { action, recipient }입니다. |
| Grant.LimitExceeded | 성공적인 인가 (Authorization)로 인해 사용자가 앱의 최대 동시 인증 기기 수 제한(maxAllowedGrants)을 초과하면, Logto가 해당 앱의 가장 오래된 grant를 해제합니다. |
자주 묻는 질문
PostRegister와 User.Created의 차이점은 무엇인가요?
PostRegister와 User.Created의 차이점은 무엇인가요?PostRegister는 사용자가 사용자 가입 플로우를 통해 새 계정을 성공적으로 생성할 때 트리거됩니다. User.Created는 Management API를 통해 새 사용자 계정이 생성될 때 트리거됩니다.