Closed akirk closed 1 month ago
The tests fail because WordPress redirects to oauth/authorize/
. The flow works (i.e. fixes the issue described in #129) for clients that support and follow those redirects but the test expects oauth/authorize
to be served without a redirect. I think it's better for compatibility to avoid the redirect.
The responsible code is here in core: https://github.com/WordPress/wordpress-develop/blob/a4123728068e09200d7dfe2d5a88f803c1adf2aa/src/wp-includes/canonical.php#L695-L697
So rest routes get special treatment, I think this is what we need to convert this to.
I found another solution, so I think this is ready.
When a post exists on the WordPress site that includes the word "authorize", WordPress redirects there instead of letting EMA handle the path.
This adds the necessary rewrite routing for this. In the course I fixed two more bugs:
'^'
prev
andnext
as intended and also only for our own REST requests.Fixes #129.