docs: document Grant.LimitExceeded webhook event - #1460
Merged
Conversation
Deploying logto-docs with
|
| Latest commit: |
504ade8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c0b3bfd7.logto-docs.pages.dev |
| Branch Preview URL: | https://simeng-docs-add-grant-limit.logto-docs.pages.dev |
Deploying logto-docs-tutorials with
|
| Latest commit: |
504ade8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://eb155360.logto-docs-tutorials.pages.dev |
| Branch Preview URL: | https://simeng-docs-add-grant-limit.logto-docs-tutorials.pages.dev |
simeng-li
enabled auto-merge (squash)
July 30, 2026 08:33
charIeszhao
approved these changes
Jul 30, 2026
charIeszhao
reviewed
Jul 30, 2026
|
|
||
| **Common use cases:** | ||
|
|
||
| - Notify the user that they were signed out on another device, and from where. |
Member
There was a problem hiding this comment.
The webhook does not include the revoked device IP or location, and the revoked grant row is destroyed, so and from where is not implementable. Could we remove , and from where from this bullet?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents the
Grant.LimitExceededwebhook event added in logto-io/logto#9230 (community contribution by @Kathircpe). The event fires when a successful authorization pushes a user past an app'smaxAllowedGrantslimit and Logto revokes their oldest grants.What changed
docs/developers/webhooks/events.mdx— addedGrant.LimitExceededto the security exception hook events table.docs/developers/webhooks/request.mdx— restructured "Exception event payloads" into per-event subsections, since the family no longer has one shared shape.Grant.LimitExceededis emitted from the OIDC authorization endpoint rather than the Experience API, so unlikeIdentifier.Lockoutit carries nointeractionEventorsessionId. Added the full field table (userId,applicationId,application,maxAllowedGrants,preRevocationActiveGrantCount,revokedGrantIds), an example payload, and delivery notes.docs/sessions/session-configs.mdx— added "Monitor evictions with a webhook" under max concurrent authenticated devices, plus a related-resources link.docs/integrate-logto/application-data-structure.mdx— one-line pointer from themaxAllowedGrantsfield reference to the event.Out of the original scope, but included
Message.RateLimitedshipped in the event catalog but was never added towebhooks-request. Splitting the exception section per-event made that omission structural, so it now has its own{ action, recipient }subsection and appears in the request-body family table.Expected result
Readers subscribing to
Grant.LimitExceededin Console can find the exact payload shape without reading the core source. The field names and optionality below were verified againstpackages/core/src/event-listeners/authorization-success.tsandpackages/core/src/libraries/hook/index.tsat the merge commit:revokedGrantIdslists only grants that were actually revoked, oldest first (pMappreserves input order over theiat-sorted list).applicationis optional — the lookup is wrapped intrySafeand omitted on failure.Testing
N/A
Checklist
.changeset