Support » Plugin: JWT Auth - WordPress JSON Web Token Authentication » Force wp/v2/ to be not public

  • Resolved armediacg

    (@armediacg)


    Hi,

    I would like to know if is there a way to make default public wp routes not public and make them working with token.
    I’ve installed the plugin and it works fine, but still public wp calls (like wp/v2/product works without token.

    Thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter armediacg

    (@armediacg)

    I fixed this by adding the endpoints to the default_whitelist filter

    Plugin Author Bagus

    (@contactjavas)

    Hi @armediacg 🙂 thanks for coming here. Glad you’ve found the solution.

    Yea, as you know, the wp/v2 namespace is whitelisted by default. The solution is to exclude it from the default whitelist through jwt_auth_default_whitelist filter.

    Best,
    Bagus

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Force wp/v2/ to be not public’ is closed to new replies.