Closed PascalDeclercq1964 closed 4 years ago
Which plugin are you using for JWT auth?
Works: JWT Auth for WP rest Api by Enrique Chavez
Does not work (anymore); JWT Auth Wordpress Json Webtoken by Useful team
Problem is that the first is officially outdated and the latter is the latest official version.
the latter one we have not supported yet, but we're looking into that in this issue: https://github.com/wp-net/WordPressPCL/issues/214
I had this error message while creating images.
Problem is that the some JWT plugins for wordpress react differently.
If you test the token request in postman, you should get an anwser in this format: { "token": "---token---", "user_email": "xxxx@xxxx.xx", "user_nicename": "xxxx", "user_display_name": "xxx" }
Some plugins (at least the on the I tested) wraps the token info in a property called 'data' and WordpressPCL doesn't handle this well. Unfortunatly I didn't save an example ... but it looks something like this: { "status" : "Ok", ......, "data" : { ---here come the actual token info } }
Hope this helps.
Additional info for the developer of WordPressPCL: problem is in line 87 of WordPressPCL.Utility.HttpHelper where 'ResponseString' should be checked which version is used for the tokendata.