• Resolved novaclever

    (@novaclever)


    Hello,

    It is possible to add a simple “verification code” endpoint (without update the password) ?
    I prefer to use the WooCommerce REST API to update the password.

    Thanks,
    Regards.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author dominic_ks

    (@dominic_ks)

    Hello,

    Thanks very much for getting in contact.

    OK, sounds like it should be fairly simple to add this.

    Out of interest, how are you using the WooCommerce API for this? The only way I can see to do this is using /wp-json/wc/v3/customers/, but if I’m not mistaken you need to be authenticated with WooCommerce REST API App Auth Keys to do this.

    Last time I was working with this we had to set up a proxy to validate whether regular users or guests could take actions with the Woo API to avoid putting the app credentials in the clinet.

    Cheers!

    Thread Starter novaclever

    (@novaclever)

    Great, thank you !
    When do you think this feature will be released ?

    And yes, we made a similar method to prevent guests from taking actions with the Woocommerce API.

    Plugin Author dominic_ks

    (@dominic_ks)

    Am working on a few things today so will do it then if I can, but a couple of days max I would expect.

    Plugin Author dominic_ks

    (@dominic_ks)

    There you go, take that for a spine, just uploaded version 0.0.4.

    You can now send just the email address and code to /wp-json/bdpwr/v1/validate-code. It works just like the set new password but without the setting of a new password.

    Plugin page docs updated with that and examples to.

    Please let me know how it works for you!

    Thread Starter novaclever

    (@novaclever)

    Thank you for your responsiveness!

    It looks like the api.route.validate-code.php is missing.
    When I check the api folder, there is no api.route.validate-code.php file.

    • This reply was modified 4 years, 9 months ago by novaclever.
    Plugin Author dominic_ks

    (@dominic_ks)

    Ah, odd one, not sure why those changes didn’t get checked in. You should be able to update again to 0.0.5 which will fix that.

    Cheers,

    Thread Starter novaclever

    (@novaclever)

    Hello,

    Yes now it’s working !

    I don’t know if I should open a new topic, but there is an error with the bdpwr_code_email_text filter :

    2020/06/08 09:53:14 [error] 87451#87451: *9276 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed in /www/my_website/public/wp-includes/class-wp-hook.php on line 289 and exactly 4 expected in /www/my_website/public/wp-content/themes/mytheme-child/functions.php:495
    Stack trace:
    #0 /www/my_website/public/wp-includes/class-wp-hook.php(289): {closure}('\n A password r...')
    #1 /www/my_website/public/wp-includes/plugin.php(206): WP_Hook->apply_filters('\n A password r...', Array)
    #2 /www/my_website/public/wp-content/plugins/bdvs-password-reset/inc/email/functions.php(57): apply_filters('bdpwr_code_emai...', '\n A password r...', 'michael...', '025371', 1591610294)
    #3 /www/my_website/public/wp-content/plugins/bdvs-password-reset/inc/class/class.user.php(53): bdpwr_send_password_reset_code_email('michael...', '025371', 1591610294)
    Plugin Author dominic_ks

    (@dominic_ks)

    Excellent. And yes please open a new thread, and if you can include your code that you’ve written to use this filter when you do that’d be great!

    Thread Starter novaclever

    (@novaclever)

    Sure ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Code verification endpoint’ is closed to new replies.