redirect_uri always errors
-
Hi, I am trying to link an ASP Net client to a WP server using this oauth plugin.
It is on a test site so far to establish the principle.
I realise that the redirect_uri is optional and if I don’t use it, it (appears to) works fine..Go to client, go somewhere that needs authorization, it goes to the WP server for login. Token etc comes back.
(more detailed testing required, but I do get a token, expiry, refresh etc. back to the client).
However, the default behaviour of asp oauth, and best practice really needs the redirect_uri and backchannel stuff working.
I am getting this error:
{“error”:”redirect_uri_mismatch”,”error_description”:”The redirect URI provided is missing or does not match”,”error_uri”:”http:\/\/tools.ietf.org\/html\/rfc6749#section-3.1.2″}
I am running WP version 5.4.1 hosted on one.com.
I have checked with them and they are not doing anything ‘odd’ at their end, they claim. I do believe that since the token is coming back, and some earlier thesting with a Jwt plugin worked fine before I decided to try this oauth route.The client is running on my home office machine without a DNS resolvable name so the callback IP address is:
This url is deinitely there and I get an asp error message back from that if I try it from outside my home.
I have used ‘fiddler’ to check and it is not getting throughmy .htaccess file is as follows:
#This is from Oauth Server web page at
#
#https://wp-oauth.com/docs/common-issues/header-authorization-may-not-work-as-expected/
#
RewriteEngine On
SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]The ‘Status’>General Information does say ‘Notice – Header ‘Authorization Basic’ may not work as expected.
To summarize:
All looks ok and it appears to work without the redirect_uri.
As soon as I add my redirect_uri it fails with error message above.
my redirect_uri does exist and gives an expected error if I just address the url.
- The topic ‘redirect_uri always errors’ is closed to new replies.