• Resolved zinkloud

    (@zinkloud)


    We are using this plugin for JTW API Authentication. We are consuming the API through a capacitor application but capacitor sends a pre-fetch request to the API leading to a 401 MISSING_AUTHORIZATION_HEADER on this request.

    We have patched your code to bypass this error:

    class Mo_API_Authentication_JWT_Auth (line 67):

    } elseif ( ( isset( $headers[‘ORIGIN’] ) && strpos($headers[‘ORIGIN’], ‘capacitor’) !== false) ||
    ( isset( $headers[‘ACCESS-CONTROL-REQUEST-HEADERS’] ) && strcasecmp($headers[‘SEC-FETCH-MODE’], ‘cors’ ) === 0 ) ) {
    return true;
    }

    I think you can patch your code to get this working.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Yash

    (@yashyadav247)

    Hello @zinkloud ,

    We greatly appreciate your detailed feedback and the proposed solution. Our development team will thoroughly evaluate the code modification you’ve provided for the Mo_API_Authentication_JWT_Auth class.

    We are committed to addressing this issue and plan to incorporate a fix in an upcoming release of the plugin to ensure seamless compatibility with Capacitor applications.

    Thanks,
    Team miniOrange

    Plugin Support Yash

    (@yashyadav247)

    Hello,

    We have released a new version of the plugin v3.7.2 which will fix the CORS related issue you were getting before.

    Please check and let us know if you still face any issues. We’d be happy to help.

    Thanks,
    Team miniOrange

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.