Zero Leakage
Confine Ory-specific logic to internal adapters. Your application code interacts only with stable, library-owned DTOs and services.
Multi-Tenant
Natively handle multiple isolated Ory projects from a single NestJS service with robust cross-tenant bleed defense.
Secure by Default
Global guards automatically secure every route. Use simple decorators to opt-out or enforce granular permissions.
Built for Modern NestJS
@Controller('orders')
export class OrderController {
@Get(':id')
@RequirePermission({
namespace: 'orders',
relation: 'view',
object: (req) => `orders:${req.params.id}`,
})
async getOrder(@Param('id') id: string, @CurrentUser() user: IamIdentity) {
return this.service.findOrder(id, user.id);
}
}
Why Choose ory-nestjs?
Production Ready
Built-in support for audit logging, health checks, and correlation tracking. ory-nestjs is designed for mission-critical applications.
Developer Experience
Stop fighting with complex security protocols. Use declarative decorators and typed services to implement IAM in minutes.
Pluggable Caching
Reduce latency and Ory load with built-in session caching. Support for in-memory and custom distributed backends.
Deterministic Testing
Ships with a comprehensive testing module that mocks Ory entirely, allowing for zero-network integration testing.