When I’ve built the
/auth endpoint, I was thinking that the people need only the JWT on this endpoint. But, there will be no problem to add more information here. If this helps you, I can add all the information about the user and the JWT.
/validate endpoint, I’ve tried to add as much information I could, because, I was thinking it will help other developers in parsing the data from JWT.
I will create a todo task on my board, and I will make the result from
/auth to be identical with
I will come back with updates.
Thank you for your suggestion.
Sounds good, thanks Nicu! And sorry, I should’ve phrased more suggestive, was a bit too demanding..
Anyways, maybe all jwt routes can have the same object
jwt array? I.e. /auth, /auth/validate and /auth/refresh? It’d make it more consistent for clients I think.
I think that the idea that you are suggesting is very good, and I totally agree.
In the beginning, I’ve released the
/auth endpoint. After having some feature requests, I’ve started to develop the
It is a little bit tricky, to change the response, because, I prefer the option that the code has backward compatibility, so the users will not have to change the code after they update the plugin. But, I will try to follow your guidelines and also offer backward compatibility.
I hope that starting next week, I will start working on this.
Also, I want to personally thank you for supporting this plugin and offering me ideas about how I can improve this plugin.
I will let you know once I make these changes.
Very welcome! Thanks to you for being so open about feature requests, that’s not granted either.
Did you consider putting the code on Gitlab/-hub in an open repository? Going forward, this plugin will be indispensable for WP REST API (esp headless setups) as it’s the most feature-complete JWT plugin (I think) and the amount of issues in the past weeks in this forum even accelerated suggesting people are just starting to get aware of it. I have a plugin since a couple of months too, no one ever writes anything :D. So from my point of view this is skyrocketing here and it’s so new. Putting it on Github might help you there, when (and if) the community contributes. Just a thought:)
Agree with @nilsnolde, having additional information in the payload would be great (e.g. use the same object for all routes). It would simplify the integration for my headless setup. +1