[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f9j1E4YXoBTc6YvXiiMnM-t9OApkUnQF3kVbiXQXmKCU":3},{"slug":4,"display_name":5,"profile_url":6,"plugin_count":7,"total_installs":8,"avg_security_score":9,"avg_patch_time_days":10,"trust_score":11,"computed_at":12,"plugins":13},"ahmedriyadh","Ahmed Hnewa","https:\u002F\u002Fprofiles.wordpress.org\u002Fahmedriyadh\u002F",1,40,85,30,84,"2026-04-04T15:27:40.532Z",[14],{"slug":15,"name":16,"version":17,"author":5,"author_profile":6,"description":18,"short_description":19,"active_installs":8,"downloaded":20,"rating":21,"num_ratings":22,"last_updated":23,"tested_up_to":24,"requires_at_least":25,"requires_php":25,"tags":26,"homepage":31,"download_link":32,"security_score":9,"vuln_count":33,"unpatched_count":33,"last_vuln_date":34,"fetched_at":35},"custom-fields-for-jwt-authentication-for-wp-rest-api","User Data Fields For JWT Authentication","1.2.1","\u003Cp>WordPress is a good content mangement system for building websites, but it will be better if you build like mobile apps,\u003Cbr \u002F>\nWith the wordpress rest api you can create posts, edit posts, view posts, Users, Uploading Media etc…\u003Cbr \u002F>\nbut the problem with the wordpress rest api it does not provide any authentication methods for third party application like mobile apps\u003Cbr \u002F>\nThe Jwt Plugin on wordpress.org does provide that\u003C\u002Fp>\n\u003Cp>and this plugin is just a addon for that plugin\u003C\u002Fp>\n\u003Cp>So this plugin is useful if you don’t want to make another request to fetch user data like Id etc..\u003Cbr \u002F>\nbecause you have to get the id of the user in ordet to get all data\u003C\u002Fp>\n\u003Cp>It really simple plugin\u003Cbr \u002F>\nit writed with 50 lines of code, the size of the plugin is 3Kb\u003C\u002Fp>\n\u003Cp>Note: This Is Plugin For\u003Cbr \u002F>\n\u003Ca href=\"https:\u002F\u002Fwordpress.org\u002Fplugins\u002Fjwt-authentication-for-wp-rest-api\u002F\" rel=\"ugc\">JWT Authentication for WP REST API Plugin\u003C\u002Fa>\u003C\u002Fp>\n\u003Cp>so if the jwt authentication plugin is not installed\u003Cbr \u002F>\nthis plugin will not add the fields to it endpoints\u003C\u002Fp>\n\u003Cp>and the fields will be added only if the token is getted successfully\u003C\u002Fp>\n\u003Cp>Example request (before install the plugin):\u003Cbr \u002F>\n{\u003Cbr \u002F>\n    “token”: “eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xOTIuMTY4LjAuMTgyIiwiaWF0IjoxNjE0MDg3NDQ2LCJuYmYiOjE2MTQwODc0NDYsImV4cCI6MTYxNDY5MjI0NiwiZGF0YSI6eyJ1c2VyIjp7ImlkIjoiMSJ9fX0.KeAUc7PiTne0_PThsSAWo1ruvl2Ocu-fbCn2jG7zkoE”,\u003Cbr \u002F>\n    “user_email”: “example@example.com”,\u003Cbr \u002F>\n    “user_nicename”: “admin”,\u003Cbr \u002F>\n    “user_display_name”: “admin”\u003Cbr \u002F>\n}\u003C\u002Fp>\n\u003Cp>Example response (after install the plugin):\u003Cbr \u002F>\n{\u003Cbr \u002F>\n    “token”: “eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xOTIuMTY4LjAuMTgyIiwiaWF0IjoxNjE0MDg2NjQyLCJuYmYiOjE2MTQwODY2NDIsImV4cCI6MTYxNDY5MTQ0MiwiZGF0YSI6eyJ1c2VyIjp7ImlkIjoiMSJ9fX0.nyDOICdQcZKbWZo2kQRp_eLBkuxjnK_rpxs-HJREyCg”,\u003Cbr \u002F>\n    “user_email”: “example@example.com”,\u003Cbr \u002F>\n    “user_nicename”: “admin”,\u003Cbr \u002F>\n    “user_display_name”: “admin”,\u003Cbr \u002F>\n    “user_id”: 1,\u003Cbr \u002F>\n    “user_login”: “admin”,\u003Cbr \u002F>\n    “user_first_name”: “sfd”,\u003Cbr \u002F>\n    “user_last_name”: “”,\u003Cbr \u002F>\n    “user_roles”: [\u003Cbr \u002F>\n        “administrator”\u003Cbr \u002F>\n    ],\u003Cbr \u002F>\n    “user_role”: “administrator”,\u003Cbr \u002F>\n    “user_registered”: “2021-02-17 09:21:29”,\u003Cbr \u002F>\n    “user_url”: “http:\u002F\u002Flocalhost”,\u003Cbr \u002F>\n    “user_status”: “0”,\u003Cbr \u002F>\n    “user_avatar_url”: “https:\u002F\u002Fsecure.gravatar.com\u002Favatar\u002F22feea4605ac5b7163eac439b5241034?s=96&d=mm&r=g”,\u003Cbr \u002F>\n    “user_activation_key”: “”\u003Cbr \u002F>\n}\u003C\u002Fp>\n\u003Cp>Of course you can add the code of this plugin to your Theme,\u003Cbr \u002F>\nbut this is not recommened because when you change the theme or update it\u003Cbr \u002F>\nthe changes will revert back, you can create child theme for that\u003Cbr \u002F>\nbut instead you can just install this simple plugin\u003C\u002Fp>\n\u003Cp>Don’t forget to setup (JwtAuthenticatonForWordpress)[https:\u002F\u002Fwordpress.org\u002Fplugins\u002Fjwt-authentication-for-wp-rest-api\u002F]\u003C\u002Fp>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fahmedhnewa\u002Fuser-data-fields-jwt-plugin\" rel=\"nofollow ugc\">Github\u003C\u002Fa>\u003C\u002Fp>\n\u003Ch3>Can Add User Data Fields To Validate Token Endpoint ?\u003C\u002Fh3>\n\u003Cp>This plugin can also add user data fields to validate token endpoint,\u003C\u002Fp>\n\u003Cp>Unfortunately, the jwt extension does not support using the filter for validate_token function,\u003Cbr \u002F>\nSo You Will Need To Modify Some Codes Inside Jwt Plugin Codes\u003Cbr \u002F>\nGo To \\wp-content\\plugins\\jwt-authentication-for-wp-rest-api\\public\\class-jwt-auth-public.php\u003Cbr \u002F>\nAnd At The End Of Function That Named validate_token\u003Cbr \u002F>\nIn Line 302\u003C\u002Fp>\n\u003Cp>Edit This Code\u003Cbr \u002F>\nFrom :\u003Cbr \u002F>\n\u002F** If the output is true return an answer to the request to show it *\u002F\u003Cbr \u002F>\n            return array(\u003Cbr \u002F>\n                ‘code’ => ‘jwt_auth_valid_token’,\u003Cbr \u002F>\n                ‘data’ => array(\u003Cbr \u002F>\n                    ‘status’ => 200,\u003Cbr \u002F>\n                ),\u003Cbr \u002F>\n            );\u003Cbr \u002F>\nTo :\u003Cbr \u002F>\n$value = array(\u003Cbr \u002F>\n            ‘code’ => ‘jwt_auth_valid_token’,\u003Cbr \u002F>\n                ‘data’ => array(\u003Cbr \u002F>\n                    ‘status’ => 200,\u003Cbr \u002F>\n                )\u003Cbr \u002F>\n            );\u003Cbr \u002F>\n            \u002F** If the output is true return an answer to the request to show it *\u002F\u003Cbr \u002F>\n            return apply_filters(‘jwt_auth_validate_token’, $value, $token);\u003C\u002Fp>\n\u003Cp>Now you have done,\u003Cbr \u002F>\nthe plugin should be able to add new values by adding a filter\u003C\u002Fp>\n\u003Cp>Note :\u003Cbr \u002F>\nIf you updated the jwt plugin,\u003Cbr \u002F>\nyou should again edit the code because it will be removed\u003C\u002Fp>\n\u003Ch3>REQUIREMENTS\u003C\u002Fh3>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fwordpress.org\u002Fplugins\u002Fjwt-authentication-for-wp-rest-api\u002F\" rel=\"ugc\">JWT Authentication for WP REST API Plugin\u003C\u002Fa>\u003C\u002Fp>\n","Wordpress is a good content mangement system for building websites, but it will be better if you build like mobile apps,",2337,100,3,"2022-08-01T18:33:00.000Z","6.0.11","",[27,28,29,30],"json-web-authentication","jwt","wp-api","wp-json","https:\u002F\u002Fwordpress.org\u002Fplugins\u002Fcustom-fields-for-jwt-authentication-for-wp-rest-api\u002F","https:\u002F\u002Fdownloads.wordpress.org\u002Fplugin\u002Fcustom-fields-for-jwt-authentication-for-wp-rest-api.1.2.1.zip",0,null,"2026-03-15T15:16:48.613Z"]