handsome-agency-20541
07/12/2024, 12:35 PMchilly-king-10285
07/12/2024, 12:35 PMchilly-king-10285
07/12/2024, 12:36 PMhandsome-agency-20541
07/12/2024, 12:37 PM"skip_consent": true configured for my OIDC client.chilly-king-10285
07/12/2024, 12:37 PMchilly-king-10285
07/12/2024, 12:38 PM"skip_consent": true for your OIDC client, but you want to skip the "Confirm it's you" login screen for users that already have an active Ory session, you should check the skip property of the login request. When you fetch the login request using the getOAuth2LoginRequest method, it returns a loginRequest object. This object has a skip property. If skip is true, it means the user is already authenticated, and you can accept the login request without showing the login form. Here is a code snippet that shows how to handle this: javascript const challenge = request.query.login_challenge.toString() const { data: loginRequest } = await ory.getOAuth2LoginRequest({ loginChallenge: challenge.toString(), }) if (loginRequest.skip) { // User is already authenticated, don't show the login form and simply accept the login request. await ory .acceptOAuth2LoginRequest({ loginChallenge: challenge, acceptOAuth2LoginRequest: { subject: loginRequest.subject, }, }) .then(({ data }) => response.redirect(data.redirect_to)) return } In this code, if loginRequest.skip is true, the login request is accepted without showing the login form, and the user is redirected to the URL specified in data.redirect_to. For more details, please refer to the [Ory documentation](https://www.ory.sh/docs/oauth2-oidc/custom-login-consent/flow#login-endpoint-code-example).handsome-agency-20541
07/12/2024, 12:47 PMgetOAuth2LoginRequest myself. I’m sending the client browser to /oauth2/auth and the rest happens on Ory Network backends and UI. How can I control those?chilly-king-10285
07/12/2024, 12:47 PMchilly-king-10285
07/12/2024, 12:52 PMhandsome-agency-20541
07/17/2024, 2:48 PMchilly-king-10285
07/17/2024, 2:48 PMchilly-king-10285
07/17/2024, 2:48 PM