Integrate Ory in a NestJS application

This page summarizes the projects mentioned and recommended in the original post on dev.to

SurveyJS - 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
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • cat-fostering

    Ory demonstration with NestJS

  • # from https://github.com/getlarge/cat-fostering/blob/main/infra/ory-kratos/kratos-template.yaml dsn: '##kratos_dsn##' # ... identity: default_schema_id: default schemas: - id: default url: '##kratos_identity_schemas_default##' # ... selfservice: allowed_return_urls: @@kratos_selfservice_allowed_return_urls@@ default_browser_return_url: '##kratos_selfservice_default_browser_return_url##' flows: error: ui_url: '##kratos_selfservice_flows_errors_ui_url##' login: after: code: hooks: [] hooks: [] lookup_secret: hooks: [] oidc: hooks: [] password: hooks: - hook: web_hook config: method: '##kratos_selfservice_flows_login_after_hook_config_method##' auth: type: api_key config: value: '##kratos_selfservice_flows_login_after_hook_config_auth_config_value##' in: header name: X-Ory-API-Key url: '##kratos_selfservice_flows_login_after_hook_config_url##' body: '##kratos_selfservice_flows_login_after_hook_config_body##' can_interrupt: ##kratos_selfservice_flows_login_after_hook_config_can_interrupt## response: ignore: ##kratos_selfservice_flows_login_after_hook_config_response_ignore## parse: ##kratos_selfservice_flows_login_after_hook_config_response_parse## totp: hooks: [] webauthn: hooks: [] before: hooks: [] lifespan: 30m0s ui_url: '##kratos_selfservice_flows_login_ui_url##' logout: after: default_browser_return_url: '##kratos_selfservice_default_browser_return_url##' recovery: after: hooks: [] before: hooks: [] enabled: true lifespan: 30m0s notify_unknown_recipients: false ui_url: '##kratos_selfservice_flows_recovery_ui_url##' use: code registration: after: code: hooks: [] hooks: [] oidc: hooks: - hook: show_verification_ui password: hooks: - hook: web_hook config: method: '##kratos_selfservice_flows_registration_after_hook_config_method##' auth: type: api_key config: value: '##kratos_selfservice_flows_registration_after_hook_config_auth_config_value##' in: header name: X-Ory-API-Key url: '##kratos_selfservice_flows_registration_after_hook_config_url##' body: '##kratos_selfservice_flows_registration_after_hook_config_body##' can_interrupt: ##kratos_selfservice_flows_registration_after_hook_config_can_interrupt## response: ignore: ##kratos_selfservice_flows_registration_after_hook_config_response_ignore## parse: ##kratos_selfservice_flows_registration_after_hook_config_response_parse## - hook: show_verification_ui webauthn: hooks: - hook: show_verification_ui before: hooks: [] enabled: true lifespan: 30m0s login_hints: true ui_url: '##kratos_selfservice_flows_registration_ui_url##' #... methods: code: config: lifespan: 15m0s enabled: true mfa_enabled: false passwordless_enabled: false link: config: base_url: "" lifespan: 15m0s enabled: true lookup_secret: enabled: false oidc: config: providers: [] enabled: false password: config: haveibeenpwned_enabled: true identifier_similarity_check_enabled: true ignore_network_errors: true max_breaches: 1 min_password_length: 8 enabled: true profile: enabled: true totp: config: issuer: CatFostering enabled: true webauthn: config: passwordless: false rp: display_name: CatFostering id: '##kratos_selfservice_methods_webauthn_config_rp_id##' origins: @@kratos_selfservice_methods_webauthn_config_rp_origins@@ enabled: ##kratos_selfservice_methods_webauthn_enabled## # ... version: v1.1.0

  • config

    Configuration module for Nest framework (node.js) ๐Ÿ“ (by nestjs)

  • The @nestjs/config module will load environment variables and configuration files into the NestJS application. The configuration module will be responsible for loading the Ory Kratos and Ory Keto configuration files and making them available to the application. To validate the configuration, we will create an environment-variables.ts file that checks if the required environment variables are set and the configuration files exist.

  • SurveyJS

    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 logo
  • nestjs-ory-integration

    A suite of libraries to make NestJS and Ory fall in love

  • 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.

  • nx

    Smart Monorepos ยท Fast CI

  • Implementation Phase: We will create a new Nx workspace, set up a NestJS application, configure Ory Kratos and Ory Keto using Docker Compose, and implement the necessary modules, services, controllers, and entities to integrate Ory into the CatFoster application.

  • mermaid

    Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown

  • To visualize the user flow for the CatFoster project, we will create a series of diagrams using Mermaid to illustrate the different user interactions within the system. These interactions include signing up and signing in, creating a cat profile, updating and deleting their cat profiles, requesting to foster a cat, and approving fostering requests.

  • Ory Kratos

    Next-gen identity server replacing your Auth0, Okta, Firebase with hardened security and PassKeys, SMS, OIDC, Social Sign In, MFA, FIDO, TOTP and OTP, WebAuthn, passwordless and much more. Golang, headless, API-first. Available as a worry-free SaaS with the fairest pricing on the market! (by ory)

  • In the onSignIn method, if the user's email address is not verified, an error is thrown to prevent login, see documentation. This logic is similar to the original require_verified_address hook in Ory Kratos. Unless the identity schema does not require email verification, the user can log in without a verified email address. We will use this logic to skip the email verification step for our end-to-end tests. The OryWebhookError class is a custom error class that extends the HttpException class from NestJS. It formats the error response in the format expected by Ory Kratos webhooks allowing the error message to be displayed in the Self-Service UI.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • How to Build a Node.js GraphQL API With NestJS and Prisma

    7 projects | dev.to | 6 Jul 2023
  • How to Become a Node.js Backend Developer? Share Helpful Resources!

    4 projects | /r/node | 12 Jun 2023
  • Anybody have a favorite typescript/node starter or boilerplate?

    8 projects | /r/typescript | 26 Mar 2023
  • [AskJS] How to architect a JavaScript (backend) app that can scale?

    2 projects | /r/javascript | 11 Jan 2023
  • 5 steps to create a bare minimum NestJS app from scratch!

    2 projects | dev.to | 11 Dec 2022