Support » Plugin: WP OAuth Server (OAuth Authentication) » I think there is a bug!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Justin Greer


    Forum Moderator


    I am not sure you provided the current file for your update. Please confirm the file change and update this thread.

    Justin Greer

    Actually, I had to do the exact same change at line


    //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.

    Hello there,
    I have the same problem on an old website.
    For this one, we’re mainly using WordPress for the authentification : We just have a login page with Wp Oauth Server, then we redirect to another part without WordPress.

    Here are my environnements :
    – Test Server :
    WordPress v5.2.2 with WP OAuth Server – Full v3.8.1
    – Production Server :
    WordPress v4.6.6 with WP OAuth Server – Full v3.2.86

    (Same problem with WP 4.6.6 & WP oAuth Server – Full v3.8.1 on Test Server)

    After some researches in code, trying to change our urls, our params, or understanding if someone has created a weird .htaccess in production to handle the problem, we found out the same modification as @ptrempe has shown.

    wp_redirect( wp_login_url( site_url( $_SERVER[‘REQUEST_URI’] ) ) );
    My url on login page is:…

    wp_redirect( wp_login_url( $_SERVER[‘REQUEST_URI’] ) );
    My url on login page is:…

    In first case, we are on a classic WP 404 not found.
    In second case, we are on the other application part, as desired.

    The only solution we have right now is to remove “site_url” in wp-content/plugins/wp-oauth-server/library/class-wo-api.php but that’s absolutely not a long-term solution…

    So if you have a better way to solve this, it would be huge !

    Thanks 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.