Pass more parameters for consent app in OAuth 2.0 Authorize Code


Base on the tutorial: the last session is: Perform OAuth 2.0 Flow

After creating consumer then perform OAuth 2.0 Authorize Code Flow:

docker run --rm -it --network hydraguide -p 9010:4445 oryd/hydra:v0.11.6 token user --skip-tls-verify --auth-url https://localhost:9000/oauth2/auth --token-url https://ory-hydra-example–hydra:4444/oauth2/token --id some-consumer --secret consumer-secret --scopes openid,offline,hydra.clients --redirect http://localhost:9010/callback

How I pass more parameter for consent app due to I setup ORY Hydra for multi-customer (have may users) login base on different customer.

Many thanks!


WHile it’s not possible to do that in the hydra command, you can easily append any query parameters in the OAuth2 Authorize Code URL (http://hydra/oauth2/auth?client_id=....&myAdditionalParam=foo). The full URL is available to the consent app as the redirectUrl value of the consent request payload.