• Resolved marcoelisa

    (@marcoelisa)


    Hi,

    I have migrated my WordPress installation from localhost to server. When I try to validate the jwt via jwt/v1/auth/validate it throws error 400 bad request. It was working perfectly on my localhost.

    I have checked the list of available endpoints from /wp-json/jwt/v1 and I can see the endpoint for /auth/validate is listed there.

    Is there any other step that I should do after migrating the WordPress installation?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Nicu Micle

    (@nicu_m)

    Hello @marcoelisa,

    Please make sure you make a GET request on /auth/validate and you send the JWT in the request, header, cookie or in the session.

    Also, on the live server, there may be a different link. Please copy the example request URL for validating, and add it to your browser.

    If this issue persists, can you please show me the exact response that you’re API gives you?

    Best regards,
    Nicu.

    Thread Starter marcoelisa

    (@marcoelisa)

    Hello @nicu_m,

    Thank you for your reply.

    The problem is only happen if I’m sending the JWT inside headers as Authorization: Bearer JWT_CODE, but when I enabled JWT on URL params then it is working again.

    Maybe it has something to do with the server settings. I’m gonna take a look at it later.

    For now I’m gonna mark it as resolved.

    Plugin Author Nicu Micle

    (@nicu_m)

    Hello @marcoelisa,

    You can try to change the header name from “General”, or check this thread:
    https://www.ads-software.com/support/topic/validate-by-autorization-header/

    PS: please don’t forget to rate this plugin.

    Best regards,
    Nicu.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘jwt/v1/auth/validate bad request 400 after migration’ is closed to new replies.