Skip to content

AuthMiddlewareOptions

The second argument of createAuthMiddlewares.

TTier extends string = string

readonly optional rateLimits?: Readonly<Record<TTier, TrpcRateLimitRule>>

Named rate limits, checked when the middlewares are made. A procedure picks one with rateLimited(name, 'tier'), or with rateLimited('tier') to share that tier’s budget with every procedure that does the same. A tier named default replaces the 10 a minute of rateLimited(name).