Title: WP-OAuth Redirect
Last modified: May 15, 2017

---

# WP-OAuth Redirect

 *  [portbox](https://wordpress.org/support/users/portbox/)
 * (@portbox)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/wp-oauth-redirect/)
 * I am using an WP-OAuth to allow users to authenticate to my site from theirs,
   and then redirect back to where they came from once authenticated. I am sending
   them to `https://www.example.com/custom-tml-login/?redirect_to=https://www.example.
   com/oauth/authorize/?response_type=code&client_id=myspecialclientID&redirect_uri
   =https://www.example-auth-site.com/back-to-where-you-came-from/` which brings
   them to the login form, however after logging in, it brings them into the member
   page on example.com instead of the referral URL. How do I remedy this?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Jeff Farthing](https://wordpress.org/support/users/jfarthing84/)
 * (@jfarthing84)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/wp-oauth-redirect/#post-9151676)
 * Did you try escaping the `redirect_to` value?
 *  Thread Starter [portbox](https://wordpress.org/support/users/portbox/)
 * (@portbox)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/wp-oauth-redirect/#post-9156023)
 * Escaping it within the URL posted above? How do you mean by that?
 *  Thread Starter [portbox](https://wordpress.org/support/users/portbox/)
 * (@portbox)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/wp-oauth-redirect/#post-9168305)
 * Also, on your page [http://docs.thememylogin.com/custom-redirection/](http://docs.thememylogin.com/custom-redirection/)
   you mention an options page with modules and I can’t find that anywhere. I don’t
   see where the options page is or how to enable modules. You then have a link 
   on the page mentioned above called Managing Modules ([http://www.jfarthing.com/docs/theme-my-login/general#managing-modules](http://www.jfarthing.com/docs/theme-my-login/general#managing-modules))
   which leads to a 404. I just want to be able to redirect my users back to the
   value specified by `redirect_uri` in the URL, or, back to the referer.
 *  Thread Starter [portbox](https://wordpress.org/support/users/portbox/)
 * (@portbox)
 * [9 years ago](https://wordpress.org/support/topic/wp-oauth-redirect/#post-9179902)
 * What do you mean by escaping redirect? Can you give an example? When my users
   are sent to my normal login page at: `https://www.example.com/login/?redirect_to
   =https://www.example.com/oauth/authorize/?response_type=code&client_id=myspecialclientID&
   redirect_uri=https://www.example-auth-site.com/back-to-where-you-came-from/` 
   it works fine, but if you go to `https://www.example.com/custom-tml-login/?redirect_to
   =https://www.example.com/oauth/authorize/?response_type=code&client_id=myspecialclientID&
   redirect_uri=https://www.example-auth-site.com/back-to-where-you-came-from/` 
   then it blank pages me after login. How do I get TML to recognize the `redirect_to`
   value and redirect my user to that location after login?
 *  Thread Starter [portbox](https://wordpress.org/support/users/portbox/)
 * (@portbox)
 * [9 years ago](https://wordpress.org/support/topic/wp-oauth-redirect/#post-9180411)
 * I realized that after logging into the custom-tml-login page, it takes me to `
   https://www.example.com/oauth/authorize/?response_type=code` instead of the full`
   redirect_to` parameter. Why is it cutting off the rest of the value? Once it 
   hits `&client_id` I guess it thinks that the `redirect_to` value ends there, 
   but that is not the case. How do I get it to pickup the rest of the URL?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘WP-OAuth Redirect’ is closed to new replies.

 * ![](https://ps.w.org/theme-my-login/assets/icon-256x256.png?rev=1891232)
 * [Theme My Login](https://wordpress.org/plugins/theme-my-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/theme-my-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/theme-my-login/)
 * [Active Topics](https://wordpress.org/support/plugin/theme-my-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/theme-my-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/theme-my-login/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [portbox](https://wordpress.org/support/users/portbox/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/wp-oauth-redirect/#post-9180411)
 * Status: not resolved