I have added github as idp in keycloak, and in my github oauth app I have added keycloak redirect_uri as callback url.
I am redirecting user to keycloak, which internally redirects user to git hub login page. After login, on consent screen if user gives his consent, then github is redirecting back to keycloak with code in query parameter, which internally redirects back to my callback endpoint.
{base_url}/auth/realms/{realm}/broker/github/endpoint?code={code}&state={state}
However, if user doesn’t give his access, then github is redirecting to keycloak with error.
{base_url}/auth/realms/{realm}/broker/github/endpoint?error=access_denied&error_description=The+user+has+denied+your+application+access.&error_uri=https%3A%2F%2Fdocs.github.com%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23access-denied&state={state}
Is there a way I can redirect user back to my application from Keycloak if user denied access.