Socket
Book a DemoInstallSign in
Socket

hydra-login-consent-logout

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hydra-login-consent-logout

This is a reference implementation for the User Login and Consent flow of Ory OAuth2 service (Hydra) in NodeJS. The application is bootstrapped using the `express` cli.

latest
npmnpm
Version
25.4.0
Version published
Maintainers
1
Created
Source

This is a reference implementation for the User Login and Consent flow of Ory OAuth2 service (Hydra) in NodeJS. The application is bootstrapped using the express cli.

  • Overview
  • Running

Overview

Apart from additions (./routes/login.ts, ./routes/consent.ts) and their respective templates, only a [CSRF Middleware] has been added. Everything else is the standard express template.

Also, a simple helper that makes HTTP requests has been added to ./services/hydra.js which uses the node-fetch library.

To set this example up with ORY Hydra, please refer to the official documentation.

Running

Please head over to the ORY Hydra 5 Minute Tutorial to see how this works.

FAQ

TLS Termination

You can mock TLS Termination by setting environment variable MOCK_TLS_TERMINATION to any value, for example MOCK_TLS_TERMINATION=y. This will add X-Forwarded-Proto: https to each HTTP Request Header.

Integrating with Ory Network

To integrate this example app with Ory Cloud Oauth2 Service set variable ORY_API_KEY with value of your Ory API Key / Ory Personal Access Token and set HYDRA_ADMIN_URL to the value of you Ory Cloud API URL which you can find in your Ory Cloud Project

FAQs

Package last updated on 07 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts