Skip Navigation

[Escalated to 2nd Tier] WP Archive Block does not work when JWT Auth (simple REST Auth)plugin is active

This support ticket is created 3 years, 12 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Waqar 3 years, 12 months ago.

Assisted by: Waqar.

Author
Posts
#1950475

I want to edit any Archive template existing or new with Gutenberg it shows nothing (with new) or the block error (editing existing template).

Using elimination I found it is JWT plugin that causes this. Something with REST Authentication, it seems.

I found a post where somebody also determined this and wrote he would investigate the reason, but no further post there.

#1951055

Hi,

Thank you for contacting us and I'd be happy to assist.

I was able to reproduce this on my test website too. When the "JWT Auth" plugin is active, it is not possible to edit the blocks based, Toolset content templates, views, or WordPress archives.

Since these items use REST API endpoints and the "JWT Auth" plugin seems to block all but a few default endpoints, this conflict arises.

I've shared these findings with the concerned team for further review and will keep you updated through this ticket.

regards,
Waqar

#1951065

Thank you, Waqar for the prompt response. I am really glad, you could reproduce this. 🙂

Since JWT is quite a useful simple authorisation solution which is required to work with REST it would be useful to have a solution.

#1953231

Thank you for waiting.

I've received a reply from the concerned team and during further testing, we were not able to whitelist Toolset related REST API endpoints using the "jwt_auth_whitelist" filter from the plugin's documentation:


add_filter( 'jwt_auth_whitelist', function ( $endpoints ) {
    return array(
		'/wp-json/ToolsetBlocks/Rest/API/v1',
		'/wp-json/toolset-views/v1',
		'/wp-json/toolset-dynamic-sources/v1',
		'/wp-json/otgs/installer/v1'	
    );
} );

We'll recommend getting in touch with the "JWT Auth" plugin's author to share some more insights on why this whitelisting is not working.

If the plugin author needs any other information from Toolset's side, please do let us know.