nestjs-ory-integration

A suite of libraries to make NestJS and Ory fall in love (by getlarge)

Nestjs-ory-integration Alternatives

Similar projects and alternatives to nestjs-ory-integration

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better nestjs-ory-integration alternative or higher similarity.

nestjs-ory-integration discussion

Log in or Post with

nestjs-ory-integration reviews and mentions

Posts with mentions or reviews of nestjs-ory-integration. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-05-16.
  • Integrate Ory in a NestJS application
    6 projects | dev.to | 16 May 2024
    To protect the routes, we will create the OryActionGuard that authenticates requests from Kratos webhooks and use the OryAuthenticationGuard (from @getlarge/kratos-client-wrapper) that authenticates users using the Kratos session.
  • Create NestJS libraries to interact with Ory API
    7 projects | dev.to | 11 May 2024
    // from https://github.com/getlarge/nestjs-ory-integration/blob/main/packages/kratos-client-wrapper/src/lib/ory-authentication.guard.ts // ... export const OryAuthenticationGuard = ( options: Partial = defaultOptions ): Type => { @Injectable() class AuthenticationGuard implements CanActivate { readonly logger = new Logger(AuthenticationGuard.name); constructor(readonly oryService: OryFrontendService) {} async canActivate(context: ExecutionContext): Promise { const { cookieResolver, sessionTokenResolver, isValidSession, postValidationHook, } = { ...defaultOptions, ...options, }; try { const cookie = cookieResolver(context); const xSessionToken = sessionTokenResolver(context); const { data: session } = await this.oryService.toSession({ cookie, xSessionToken, }); if (!isValidSession(session)) { return false; } if (typeof postValidationHook === 'function') { await postValidationHook.bind(this)(context, session); } return true; } catch (error) { this.logger.error(error); return false; } } } return mixin(AuthenticationGuard); };

Stats

Basic nestjs-ory-integration repo stats
2
10
9.2
6 days ago

The primary programming language of nestjs-ory-integration is TypeScript.


Sponsored
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io