• Resolved johnymanuelli

    (@johnymanuelli)


    Hi there,
    is it possible somewhere to hook the function called by the url

    jwt-auth/v1/auth/validate/?jwt=…. ?

    I wanted to pass custom user data to the response.

    Now the user data only gives me:

    ID: "1"
    display_name: "admin"
    user_activation_key: ""
    user_email: "[email protected]"
    user_login: "admin"
    user_nicename: "admin"
    user_registered: "2021-05-18 12:53:31"
    user_status: "0"
    user_url: "https://hidden.com"

    Thank you

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

    (@nicu_m)

    Hello @johnymanuelli,

    I will add this hook in the weekend. I find it a cool feature.

    I will get back to you once it is ready.

    PS: i’m not sure if you are using the latest plugin version, but some of these details are already present in the validate endpoint. You can check the documentation:
    ??https://simplejwtlogin.com/docs/validate-token#responses

    Best regards,
    Nicu.

    Thread Starter johnymanuelli

    (@johnymanuelli)

    Thank you for you fast response, yes i have the latest version, I only mentioned the user object response.

    I just want to append some WC customer data, (billing & shipping address)

    Thanks :]

    • This reply was modified 2 years, 8 months ago by johnymanuelli.
    Plugin Author nicu_m

    (@nicu_m)

    Hello @johnymanuelli,

    I’ve implemented hooks for each successful response.

    The documentation is not updated yet, but on the hooks page, you can see the parameters for the hook.

    Let me know if this helps.

    PS: Please don’t forget to rate the plugin and spread the word about it.

    Best regards,
    Nicu.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hook / Change jwt-auth/v1/auth/validate/?jwt=…’ is closed to new replies.