Rating: 5 stars
Hi,
I use the Traveler Theme. I installed it according to the instructions, but I always get a connection error: Status Code Error: 401 when connecting with make (integromat)
base url: ./domain.com/wp-json/
API Key: copied from wp-config.php
How do I fix this?
Thanks
]]>Rating: 3 stars
I can’t find references about how to block endpoints. You can use a code like this:
// add user id to the token to store on your front end
function add_user_id_and_role_to_jwt_response( $data='', $user='' ) {
$data[ 'user_id' ] = $user->data->ID;
return $data;
}
add_filter( 'jwt_auth_token_before_dispatch', 'add_user_id_and_role_to_jwt_response', 10, 2);
// create a callback function
function token_jwt_permission_callback ( WP_REST_Request $request = null ) {
$user_id = sanitize_text_field( $request->get_param( 'user_id' ) );
$jwt = new Jwt_Auth();
$jwt_public = new Jwt_Auth_Public( $jwt->get_plugin_name(), $jwt->get_version() );
$user_id_at_token = $jwt_public->determine_current_user( $user_id );
$validate_token = $jwt_public->validate_token( $request );
$valid_token = false;
if ( !is_wp_error( $validate_token ) ) {
$valid_token = ( $validate_token[ 'code' ] === 'jwt_auth_valid_token' );
}
if ( !$valid_token || $user_id != $user_id_at_token ) {
return false;
}
return true;
}
// when register your route:
register_rest_route( self::get_plugin_namespace(), '/get_services', array(
array(
'methods' => WP_REST_Server::CREATABLE,
'callback' => array( $this, 'get_services' ),
'permission_callback' => 'token_jwt_permission_callback', // <<<<<< set your callback here
)
) );
]]>
Rating: 5 stars
I integrated it with my Flutter app, and it works flawlessly.
Here is a little piece of code that I implemented to get User ID and Role:
add_filter('jwt_auth_token_before_dispatch', 'add_user_id_and_role_to_jwt_response', 10, 2);
function add_user_id_and_role_to_jwt_response($data, $user) {
// Aggiungi il campo 'user_id' al JSON della risposta
$data['user_id'] = $user->data->ID;
// Ottieni il ruolo dell'utente
$user_roles = $user->roles;
$user_role = !empty($user_roles) ? $user_roles[0] : '';
// Aggiungi il campo 'user_role' al JSON della risposta
$data['user_role'] = $user_role;
// Restituisci il nuovo array dati modificato
return $data;
}
]]>
Rating: 5 stars
Perfect! This plugin is very easy to install and use. It’s also easy to extend and add your own return data.
]]>Rating: 5 stars
It totally works fine. It was challenging to set it up in start but this plugin is helping me to extend the functionalities for my mobile app.
]]>Rating: 1 star
It breaks APIs that don’t require authorization.
Such as WordPress’s posts endpoint and WooCommerce’s endpoint.
]]>Rating: 5 stars
Hi,
The new version (1.3.3) block woocommerce api call.
I use OAuth1 for woocommerce so I didn’t use jwt for that (only for sign in) but now I have a 403 error.
Message: “Authorization header malformed.”
Can you tell why and how to resolved that ?
Thank you.
]]>Rating: 1 star
And author don’t seems to be able to apply fix in half a year
]]>Rating: 5 stars
Hi Team , I have an issue when i pass the token in postman , Authorization bearer I get error
I have try several tokens and emails but same issue.
“code”: “invalid_username”,
“message”: “The email address you entered does not exist.”,
“data”: null
]]>Rating: 1 star
Latest version is not usabled “Error 401 rest_not_logged_in”
]]>Rating: 5 stars
Can I Access all Subdirectory & subdomains using this
]]>Rating: 5 stars
Yep, it works
]]>Rating: 5 stars
Using this plugin for over 1 year now and it works very well ! Thank you for your time and energy to develop this app !
]]>Rating: 5 stars
I was confused about choosing the jwt plugin. There are 3 versions, the first has not been updated for 6 months and the second has not been updated for two months, the first has not worked, the second has unclear instructions and has some defects despite the presence of a dashboard, and this add-on has not been updated for two years But when I saw that it was updated a day ago, I decided to use it and all the problems that I was facing were resolved. I ask the add-on developers to update them every period, but there is something unclear, how can I amend the token expiry time? Thanks
]]>Rating: 5 stars
10/10
]]>Rating: 5 stars
Excelente trabajo! Estoy muy agradecido por este magnifico trabajo, espero que sigan desarrollando mas plugin de buena calidad. muchas gracias!
]]>Rating: 5 stars
Awesome!
]]>Rating: 5 stars
but how i can delete token when user deleted in this case that generate token even user where not in db.
]]>Rating: 5 stars
A very good documentation, authentication for the users with my app in just some simple steps. Extends the WP Rest API, make sure to read very well the documentation, it solves all problems.
]]>Rating: 5 stars
Exactly as described, very easy to use and clear documentation. Thank you
]]>Rating: 3 stars
It only shows 3 modules for a vendor. Reviews, Notifications, and enquiry.
Where are the other modules? Orders are important, products, reports…etc
Rating: 4 stars
Overall, I like this plugin. I am using it in an upcoming book.
An Admin interface to expire tokens and change the expiration time would be nice. but that’s not so much a complaint as a wish list. ??
]]>Rating: 5 stars
Thank you for this solution!
]]>Rating: 4 stars
ghk xxx
]]>Rating: 1 star
I was working until this last update, now it returns error of Authorization header malformed
. Any ideas?
Rating: 5 stars
I’m using this plugin since some months and it works perfectly, a simple way to authenticate from ext. apps
]]>Rating: 5 stars
Allowed me to get up and running with a Vue.js frontend authentication flow within minutes. Really great documentation too!
]]>Rating: 5 stars
I am using this for my first WP Rest API implementation and it is working great. I did need to edit my .htaccesss file but the included instructions took care of me.
]]>Rating: 5 stars
Very good. I’m using it with angular. It works!
]]>Rating: 2 stars
Since Version 3.3.x this plugin makes it impossible, to use the iOS App of Woocommerce. There seems to be an incompatibility with the core api of Woocommerce.
]]>