Example implementation for the User Login and Consent flow of ORY Hydra version 1.0.x in Python
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
templates
LICENSE
README.md
app.py
requirements.txt

README.md

Hydra login/consent provider - Python

This is an example implementation for the User Login and Consent flow of ORY Hydra version 1.0.x in Python.

Requirements: Python >= 3.7

Running locally

Use the official Docker Compose file from the Hydra repository and comment out the complete consent service (official NodeJS reference implementation).

Make sure to also change the OAUTH2_LOGIN_URL and OAUTH2_CONSENT_URL in the Compose file as follows:

OAUTH2_CONSENT_URL=http://localhost:5000/consent
OAUTH2_LOGIN_URL=http://localhost:5000/login

Afterwards you can install the dependencies and run the example application:

$ pip install -r requirements.txt
$ flask run

Follow the instructions in the 5 minute tutorial for testing the various OAuth 2.0 grant types.