• Resolved msowah

    (@msowah)


    The moment I activate pods, I start getting issues with my JWT plugin. I get this errors with my tokens

    {
        "success": false,
        "statusCode": 403,
        "code": "jwt_auth_invalid_token",
        "message": "Algorithm not allowed",
        "data": []
    }

    What am I doing wrong and How do I resolve this? my JWT plugin in questions https://www.ads-software.com/plugins/jwt-auth/ and I tried several other ones with the same issue. How do I resolve this please?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter msowah

    (@msowah)

    After some investigation, the issue is a result of variations in firebase/php-jwt
    while https://www.ads-software.com/plugins/jwt-auth/ was updated to v6.3. Looks like Pods is using version 5 which is creating the conflict. Any recommendations? any way around this.

    Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    This has been updated in our next planned release for Pods 2.9.11 — there’s not a great way around this at the moment unless you are using The Events Calendar or Event Tickets plugins (those have the same library but they override the one that Pods loads in).

    These three plugins share the same common library which uses JWT, even though Pods doesn’t use that particular feature of the library — it’s still unfortunately registering itself and loading ahead of the one from the JWT Auth plugin ??

    Thread Starter msowah

    (@msowah)

    I guess I have no option but to wait for the next release even though its stalling work.

    But to clarify so after the next planned release for Pods 2.9.11 pods will also be on v6.3 of firebase/php-jwt like JWT plugin right?

    Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    I’m seeing firebase/php-jwt version 6.3.0 in this code so that’s what gets included by Pods 2.9.11

    Thread Starter msowah

    (@msowah)

    Awesome, Thank you so much @sc0ttkclark , I look forward to Pods 2.9.11 and hopefully it lands soon. Thank you again.

    Plugin Support Paul Clark

    (@pdclark)

    @msowah While you’re waiting for the release, it might work to load the JWT plugin as an mu-plugin by writing a file which includes the JWT plugin and placing it in wp-content/mu-plugins/. This would cause the JWT plugin to load before Pods.

    See:

    Thread Starter msowah

    (@msowah)

    @sc0ttkclark any updates?

    Thread Starter msowah

    (@msowah)

    @pdclark by any chance any sample code to assist in how that would look like…got a little lost trying to do it

    Plugin Support Paul Clark

    (@pdclark)

    • Create the folder wp-content/mu-plugins/
    • Move wp-content/plugins/jwt-auth/ to wp-content/mu-plugins/jwt-auth/
    • Create a file wp-content/mu-plugins/jwt-auth.php
    • Put the following code in that created PHP file:
    <?php
    
    include __DIR__ . '/jwt-auth/jwt-auth.php';

    That will cause the JWT Auth plugin to load before all other plugins, which may resolve the conflict.

    Thread Starter msowah

    (@msowah)

    @pdclark I have actually resolved it by creating a wrapper class extending the jwt-auth firebase class. I so just forked the plugin and submitted PR to jwt-auth plugin which will help avoid future conflicts should it happen again.

    Plugin Contributor Scott Kingsley Clark

    (@sc0ttkclark)

    Just following up here that as of Pods 2.9.11 and Pods 2.9.11.1, this should be resolved within Pods itself.

    Thread Starter msowah

    (@msowah)

    @sc0ttkclark thanks will try it out and revert. I also wrote a fix and submitted a PR to the other plugin as well.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Plugin conflict’ is closed to new replies.