Keycloak and Nginx: auth_request
Your request to the oAuth2 service is being redirected with 302
HTTP code, maybe if you follow the redirect it will give you the response you are hoping for.
location = /oauth2/ { # Other stuff.. # You may need to comment out this: # proxy_redirect default; # Then, add this: proxy_intercept_errors on; error_page 302 = @handle_redirect;}location @handle_redirect { set $saved_redirect_location '$upstream_http_location'; proxy_pass $saved_redirect_location;}