Skip to main content
API Reference / modelence / server / AuthRateLimitOverride
AuthRateLimitOverride = object
Defined in: packages/modelence/src/app/authConfig.ts:21 A single rate-limit rule for an authentication bucket. The bucket is implied by which auth action you’re configuring (e.g. signup), so callers only specify the actor type, window size, and limit.

Example

import { time } from 'modelence';

const rule: AuthRateLimitOverride = {
  type: 'ip',
  window: time.minutes(15),
  limit: 10,
};

Properties

PropertyTypeDescriptionDefined in
limitnumberMaximum allowed hits within the window.packages/modelence/src/app/authConfig.ts:27
typeRateLimitTypeIdentifier type of the actor this rule applies to.packages/modelence/src/app/authConfig.ts:23
windownumberTime window size in milliseconds. Use time.minutes(15) etc.packages/modelence/src/app/authConfig.ts:25