Giter Site home page Giter Site logo

ory / hydra-login-consent-node Goto Github PK

View Code? Open in Web Editor NEW
295.0 17.0 126.0 696 KB

This is an ExpressJS reference implementation for the ORY Hydra User Login and Consent interface written in TypeScript and ExpressJS.

Home Page: https://www.ory.sh/hydra

License: Apache License 2.0

Dockerfile 1.23% TypeScript 82.44% Pug 12.82% Makefile 3.50%

hydra-login-consent-node's Introduction

hydra-user-and-consent-provider-node

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

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 Cloud

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.