Reputation: 336
I want to get token from wooCommerce rest api in mobile app, I am using jwt_auth plugin for login customer it create token for me but when I want to use Password_reset plugin for forgot password jwt does not allow because it want token. so How can I get token without login.
Upvotes: 0
Views: 1318
Reputation:
You need make custom route without any token for your change password and forget password
for make forget password and change password you need
Upvotes: 1
Reputation: 632
If you want to generate token without user login then it will decrease security of your app.
I would suggest you to create some custom endpoints for password reset and whitelist them from jwt like this -
add_filter( 'jwt_auth_whitelist', function ( $endpoints ) {
return array(
'/wp-json/custom/v1/webhook/*',
'/wp-json/custom/v1/otp/*',
'/wp-json/custom/v1/account/check',
'/wp-json/custom/v1/register',
);
} );
Upvotes: 3