-
Hi, I am using this template (https://github.com/ory/hydra-login-consent-node/blob/master/src/routes/login.ts) for the realization of my application. The only difference is I created the admin from scratch: ` const hydraAdmin = new OAuth2Api( The problem I am encountering concerns the fact the login_challenge value is always undefined and I do not understand from the documentation how this value is obtained. Thanks for the help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @cosmin-z Ory Hydra has to initialize the request and redirect the user to the login endpoint where the URL will contain the I would suggest taking a look at https://www.ory.sh/docs/hydra/guides/custom-ui-oauth2 |
Beta Was this translation helpful? Give feedback.
Hi @cosmin-z
The
login_challenge
isn't set by you, it is set by Ory Hydra. How this works, is you initialize an oauth flow to Hydra which redirects to Ory Kratos (with thelogin_challenge
). Kratos then redirects to the Login UI (your app / Account Experience) withlogin_challenge
in the URL as well as in the flow data.https://www.ory.sh/docs/oauth2-oidc/custom-login-consent/flow#login