Actually, I had to do the exact same change at line
202
//wp_redirect( wp_login_url( site_url( $_SERVER[‘REQUEST_URI’] ) ) );
— become —
wp_redirect( wp_login_url( $_SERVER[‘REQUEST_URI’] ) );
in class-wo-api.php,
using wp-oauth 3.7.6 with wordpress 5.2
Our dev site is located in localhost/wordpress. I suspect it is only happeniong because the wordpress website is not installed directly in the root of the http server.