flotschie
Forum Replies Created
-
It seems it was a nginx issue. Some css was blocked. Re-configuring nginx solved the issue. Many thanks for your feedback.
Forum: Plugins
In reply to: [JWT Authentication for WP REST API] Custom endpoint is unprotectedYes I solved it. The documentation is in my opinion misleading. Only /jwt-auth/v1 endpoints are protected and work like expected. User gets automatically logged in and can be checked via is_user_logged_in().
But don’t worry, just create your custom endpoints in the /jwt-auth/v1 namespace, e.g.:
register_rest_route('/jwt-auth/v1', 'profile', array( 'methods' => 'POST', 'callback' => 'wc_rest_get_profile_handler', 'permission_callback' => function($request){ return is_user_logged_in(); } ));
- This reply was modified 6 years, 1 month ago by flotschie.
I found the issue, the extend_token function called other sub functions which contained database connections with invalid parameters.
Forum: Plugins
In reply to: [JWT Authentication for WP REST API] Connection failedI found the issue, the extend_token function called other sub functions which contained database connections with invalid parameters.
Thank you for your answer. You mean, instead of transfering the values to another page, I should show the text on the form page? This is not what I want originally. Could you please give an example what do you mean?