Title: redirect_uri always errors
Last modified: May 21, 2020

---

# redirect_uri always errors

 *  [brettbutcher](https://wordpress.org/support/users/brettbutcher/)
 * (@brettbutcher)
 * [6 years ago](https://wordpress.org/support/topic/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:
 * >  [https://xx.yyy.zz.nnn/oauth/callback](https://xx.yyy.zz.nnn/oauth/callback)
 * 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 through
 * my .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.
    -  This topic was modified 6 years ago by [brettbutcher](https://wordpress.org/support/users/brettbutcher/).

Viewing 1 replies (of 1 total)

 *  Thread Starter [brettbutcher](https://wordpress.org/support/users/brettbutcher/)
 * (@brettbutcher)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/redirect_uri-always-errors/#post-12954781)
 * So, I solved this myself in the end. Partly by finding bits of this forum dealing
   with similar issues that pointed to web pages sadly no longer there…
    I get that
   this is free and all, but I would have acutally bought it had I been able to 
   get help with the evaluation process. Now I need to figure out how to log out,
   so I’ll have just one more go. If anyone else is struggling getting going with
   this and using it with asp net core, this is a link to a new question I have 
   on StackOverflow, but also shows how I got to a nearly working solution. [Link to question.](https://stackoverflow.com/questions/62263644/debugging-asp-net-core-oauth-signin-using-wordpress-and-looggin-out-properly)

Viewing 1 replies (of 1 total)

The topic ‘redirect_uri always errors’ is closed to new replies.

 * ![](https://ps.w.org/oauth2-provider/assets/icon-256x256.gif?rev=2603051)
 * [WP OAuth Server (OAuth Authentication)](https://wordpress.org/plugins/oauth2-provider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/oauth2-provider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/oauth2-provider/)
 * [Active Topics](https://wordpress.org/support/plugin/oauth2-provider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/oauth2-provider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/oauth2-provider/reviews/)

## Tags

 * [asp](https://wordpress.org/support/topic-tag/asp/)
 * [net](https://wordpress.org/support/topic-tag/net/)
 * [OAuth](https://wordpress.org/support/topic-tag/oauth/)
 * [server](https://wordpress.org/support/topic-tag/server/)

 * 1 reply
 * 1 participant
 * Last reply from: [brettbutcher](https://wordpress.org/support/users/brettbutcher/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/redirect_uri-always-errors/#post-12954781)
 * Status: not resolved