wp-graphql-jwt-authentication icon indicating copy to clipboard operation
wp-graphql-jwt-authentication copied to clipboard

internal server error 500

Open Pasqat opened this issue 3 years ago • 2 comments

With the last version whenever I try to fetch data 'as Preview' using the Authenticate: Bearer xxxx I got an internal server error from WordPress. I tried on a local server and on a live server.

The first time the setup of my Nextjs was that suggested on nextjs example and it didn't work. Then I follow the step suggested here, but it didn't work either, alas.

I've set the SetEnvInf on .htaccess.

I'm not sure if this is related but if I try this mutation

mutation refreshJwtAuthToken($input: RefreshJwtAuthTokenInput!) {
  refreshJwtAuthToken(input: $input) {
    authToken
  }
}

// variables
{
  "input": {
    "jwtRefreshToken": "my_refresh_token"
  }
}

I got this error

{
  "errors": [
    {
      "debugMessage": "Call to undefined function WPGraphQL\\JWT_Authentication\\codecept_debug()",
      "message": "Internal server error",
      "extensions": {
        "category": "internal"
      },
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "refreshJwtAuthToken"
      ]
    }
  ],
  "data": {
    "refreshJwtAuthToken": null
  },
 }

What information do I need to provide to help understand the problem?

Pasqat avatar May 05 '22 07:05 Pasqat

I've also encountered this problem with the last version, #159 solved it for me.

j-miguel avatar May 14 '22 18:05 j-miguel

@Pasqat btw. how do you handle refreshJwtAuthToken mutation? ApolloClient onError?

marziolek avatar Jun 22 '22 10:06 marziolek