Appearance
Events and Hooks
Applications can listen to package events for audit logging, metrics, notifications, or policy side effects.
Core Token Events
TokenIssuedTokenRefreshedTokenRevokedSessionRevokedAllUserTokensRevokedRefreshTokenReuseDetected
Account Security Events
MfaChallengeCreatedMfaChallengeCompletedOtpCodeCreatedOtpCodeSentOtpCodeResentOtpCodeVerifiedOtpCodeFailedOtpCodeLockedOtpCodeExpiredEmailVerificationTokenCreatedEmailVerificationSentEmailVerifiedPasswordResetTokenCreatedPasswordResetSentPasswordResetTokenConsumed
API Key Events
ApiKeyCreatedApiKeyUsedApiKeyRevokedApiKeyRotated
External Identity Events
ExternalIdentityResolved
OAuth Events
OAuthClientCreatedOAuthClientSecretRotatedOAuthClientRevokedOAuthAuthorizationApprovedOAuthAuthorizationDeniedOAuthTokenIssuedOAuthTokenRevokedOAuthConsentRevoked
Token Hooks
HookRegistry supports package-level token extension points:
- Validate token context before issue.
- Mutate token context before issue.
- Run side effects after token issue.
Use hooks for product-specific policy that should stay outside the package, such as tenant checks, role-to-scope mapping, audit correlation, or device policy.