pesseba
Forum Replies Created
-
I created this feature in this pull request: https://github.com/usefulteam/jwt-auth/pull/10
Hi @dominic_ks and @contactjavas, I created the ‘connected device’ feature in this pull request: https://github.com/usefulteam/jwt-auth/pull/10
This feature is optional. The system behave like before if the parameter is not present. It just save a meta value for user about the device key and add it in jwt token.
The devices shows up in user profile like this: https://tiny.cc/zakqszI added another feature too:
If user changes the password, all tokens becomes obsolete. The user password is not used in token generation.Please @contactjavas, check if the pull request is ok.
Hi @dominic_ks , I forgot to mention about the parameter ‘device ‘. It was added in jwt_auth_payload filter. So, I think the device information must be sent in wp-auth/token request. Could be a thrird optional parameter called device, together login and password. This value can be stored in user meta.
I think the user password (md5 hash) must be used in token generation too, so if user changes the passord, the token becomes obsolete too.
Hi @contactjavas I can contribute in GitHub too.Does this feature could be achieved using the filter jwt_auth_payload?
So you can check the parameter with the filter jwt_auth_valid_token_response:add_filter( 'jwt_auth_valid_token_response', function($response, $user, $token, $payload){ if($payload->data->user->device != 'what you want to check'){ return new WP_REST_Response( array( 'success' => false, 'statusCode' => 403, 'code' => 'jwt_auth_token_deprecated', 'message' => __( "The token is deprecated", 'jwt-auth' ), 'data' => array(), ) ); } return $response; });
This make sense?
- This reply was modified 4 years, 3 months ago by pesseba.
Forum: Plugins
In reply to: [Yoast SEO] Meta Section Content don’t loadSame problem here:
WP version: 5.1.1
Yoast version: 10.0.1
Browser: ChromeMy console dispatch these errors:
Uncaught TypeError: Super expression must either be null or a function, not undefined at components-1001.min.js:46 at components-1001.min.js:46 at Object.<anonymous> (components-1001.min.js:46) at f (commons-1001.min.js:1) at Object.<anonymous> (components-1001.min.js:46) at f (commons-1001.min.js:1) at Object.<anonymous> (components-1001.min.js:46) at f (commons-1001.min.js:1) at t (commons-1001.min.js:1) at Array.r [as push] (commons-1001.min.js:1) react-dom.min.js:104 TypeError: Cannot call a class as a function at wp-seo-help-center-1001.min.js:1 at e (wp-seo-help-center-1001.min.js:1) at ph (react-dom.min.js:97) at eg (react-dom.min.js:125) at fg (react-dom.min.js:126) at wc (react-dom.min.js:138) at fa (react-dom.min.js:137) at gg (react-dom.min.js:135) at Ca (react-dom.min.js:133) at og (react-dom.min.js:150) Pf @ react-dom.min.js:104 react-dom.min.js:137 Uncaught TypeError: Cannot call a class as a function at wp-seo-help-center-1001.min.js:1 at e (wp-seo-help-center-1001.min.js:1) at ph (react-dom.min.js:97) at eg (react-dom.min.js:125) at fg (react-dom.min.js:126) at wc (react-dom.min.js:138) at fa (react-dom.min.js:137) at gg (react-dom.min.js:135) at Ca (react-dom.min.js:133) at og (react-dom.min.js:150) wp-seo-post-scraper-1001.min.js:5 Uncaught TypeError: Cannot read property 'analysis' of undefined at Object.<anonymous> (wp-seo-post-scraper-1001.min.js:5) at f (commons-1001.min.js:1) at Object.<anonymous> (wp-seo-post-scraper-1001.min.js:5) at f (commons-1001.min.js:1) at Object.<anonymous> (wp-seo-post-scraper-1001.min.js:5) at f (commons-1001.min.js:1) at t (commons-1001.min.js:1) at Array.r [as push] (commons-1001.min.js:1) at wp-seo-post-scraper-1001.min.js:1
I disabled other plugins to check conflict and I found the cause: WP Log Viewer
- This reply was modified 5 years, 8 months ago by pesseba.
Im my case I solved this problem comented the line 234 in script public/calss-jwt-auth-public.php
$auth = isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION']) ? $_SERVER['REDIRECT_HTTP_AUTHORIZATION'] : false;
So, the error stop dispatch…
The problem is if your server uses some type of Authorization before check JWT Authorization…Same problem here…
It only happen if used with Basic Authorization toghether. As I used the Basic Authorization for page protection (for developement), I made changes in the plugin to use JWTAuthorization insted Authorization (HTTP_JWT_AUTHORIZATION insted HTTP_AUTHORIZATION). So, with no basic auth, works fine, but with basic auth I got this issue…Forum: Plugins
In reply to: [JWT Authentication for WP REST API] .htaccess rules in nginxJust add this line:
SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1
Forum: Plugins
In reply to: [WP LinkedIn Auto Publish] Can’t connect with Linkedin (version 6)@northernbeacheswebsites I solved the problem here.
First, I installed the plugin in another wp environment. So, the plugin connect right and added your app in my Linkedin account on Permitted Services (WP Auto Publish).
So, I copy the ‘wp_options’ database setting from the second site to the first one (with problem), just to check if the plugin will let me connect with these new settings.
wp_linkedin_autopublish_auth_settings wp_linkedin_autopublish_settings
I don’t know what fixed the problem. If was the database refresh or the fact that linkedin list your app now. I think it was the last one…
So I back to my first site and tried again, and the connection works! The permission page isn’t shows up, just your app page redirect appear during the validation process. https://northernbeacheswebsites.com.au/redirectlinkedin/?code=…
I still not tested in a real publish situation…
Forum: Plugins
In reply to: [WP LinkedIn Auto Publish] Can’t connect with Linkedin (version 6)Hi,
I updated the plugin, the error message now is: Something went wrong, please try again later or if the issue persists please create a support ticket.The problem seems when your application try to connect with my linkedin account. After the process, your app has no authorization in “Permitted Services” of my account. the problem seems when your application try to connect with my linkedin account. After the process, your app has no authorization in “Permitted Services” of my account.
What app name I must to search in Linkedin Permitted Services?
—
These errors still trigger too:Undefined index: wp_linkedin_autopublish_default_publish Type: PHP Notice Line: 294 File: /nas/content/live/oniria/wp-content/plugins/wp-linkedin-auto-publish/wp-linkedin-auto-publish.php Undefined index: wp_linkedin_autopublish_profile_selection Type: PHP Notice Line: 1147 File: /nas/content/live/oniria/wp-content/plugins/wp-linkedin-auto-publish/wp-linkedin-auto-publish.php Undefined index: wp_linkedin_autopublish_profile_selection Type: PHP Notice Line: 180 File: /nas/content/live/oniria/wp-content/plugins/wp-linkedin-auto-publish/inc/options-output.php
Forum: Plugins
In reply to: [WP LinkedIn Auto Publish] Can’t connect with Linkedin (version 6)Hi Jeff, sorry… The debug informations are for the plugin author @northernbeacheswebsites
I’m with you at the same problem here.Forum: Plugins
In reply to: [WP LinkedIn Auto Publish] Can’t connect with Linkedin (version 6)I enabled the WP DEBUG_LOG and got these messages when enter on settings page:
Undefined index: wp_linkedin_autopublish_profile_selection
Type: PHP Notice Line: 180
File: /nas/content/live/oniria/wp-content/plugins/wp-linkedin-auto-publish/inc/options-output.phpUndefined index: wp_linkedin_autopublish_profile_selection
Type: PHP Notice Line: 1144
File: /nas/content/live/oniria/wp-content/plugins/wp-linkedin-auto-publish/wp-linkedin-auto-publish.phpUndefined index: wp_linkedin_autopublish_default_publish
Type: PHP Notice Line: 291
File: /nas/content/live/oniria/wp-content/plugins/wp-linkedin-auto-publish/wp-linkedin-auto-publish.phpForum: Plugins
In reply to: [WP LinkedIn Auto Publish] Can’t connect with Linkedin (version 6)Hi..
I updated the plugin right now and tried again, but the problem keep the same.
Profile is empty after try connection.Get some screenshots here:
https://www.mediafire.com/file/n6o063bh4zsac2c/images.pdfHey, the plugin has a problem with script calls to create new posts. This problem extends for Rest API usage too.
I made a simple customization in plugin. Add in post-expirator.php (anywhere) an action:add_action('post_expirator_event','_scheduleExpiratorEvent',1,3);
So, in my own code I call the action:
//get the custom Post Expirator settings $expire_custom = get_option('expirationdateDefaultDateCustom'); //create a date based on settings $expire_date = date( 'Y-m-d H:i:s', strtotime($expire_custom, current_time( 'timestamp', 0 ))); //convert to GMT (Post Expirator uses in this way) $ts = get_gmt_from_date($expire_date,'U'); //create the options as you need (I don't know all options available), in my case works $opts = array(); $opts['expireType'] = 'delete'; $opts['id'] = $post_id; //call the action and be happy! do_action('post_expirator_event',$post_id,$ts,$opts);
- This reply was modified 6 years, 8 months ago by pesseba.
Forum: Plugins
In reply to: [JWT Authentication for WP REST API] mostrar lastnameYou can extend the plugin with some hooks. Follow a plugin extended I made to add some extra information about user:
https://www.mediafire.com/file/kxumbvvsxo4el4b/jwt-extend.zip