# Possible bug with 'Redirect After Discourse Login' field

**URL:** <https://meta.discourse.org/t/possible-bug-with-redirect-after-discourse-login-field/62883>\
**Category:** WordPress\
**Created:** [5월 17, 2017, 2:16오후 UTC](https://meta.discourse.org/t/possible-bug-with-redirect-after-discourse-login-field/62883 "2017-05-17T14:16:17Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![apautler](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@apautler](https://meta.discourse.org/u/apautler)\
**Post date:** [5월 17, 2017, 2:16오후 UTC](https://meta.discourse.org/t/possible-bug-with-redirect-after-discourse-login-field/62883/1 "2017-05-17T14:16:17Z")

</div>

I’ve been chatting with Arpit about the some issues with the redirect URL after you login. Here is a little context:

Our forum is connected to WordPress via the [WP Discourse](https://github.com/discourse/wp-discourse) forum. When you try to go to the forum before logging in, it redirects you to the WordPress login page (which is correct). After you login though, it redirects you to the WordPress homepage vs. the page I have set in the ‘Redirect After Discourse Login’ (see here: [http://share.ptlrdsgn.com/1q2m2b25360h](http://share.ptlrdsgn.com/1q2m2b25360h)).

Arpit referenced this code ([wp-discourse/lib/discourse-sso.php at 58546613b97497e9698b1a7110bdbb6f76baa2b8 · discourse/wp-discourse · GitHub](https://github.com/discourse/wp-discourse/blob/58546613b97497e9698b1a7110bdbb6f76baa2b8/lib/discourse-sso.php#L64)) and said:

> It seems like home\_url(‘/dashboard’) is not getting parsed correctly. This might be a bug in wp-discourse plugin, not sure though.

@simon, he said you might be able to take a look.

Ideally I’d have the user redirect back to the forum homepage after coming to the login page from that URL, but it doesn’t appear the ‘Redirect After Discourse Login’ allows external links. If that is not possible, I’d like to at least redirect the user to the WordPress page I set in the ‘Redirect After Discourse Login’ field.

---

_[View the full topic](https://meta.discourse.org/t/possible-bug-with-redirect-after-discourse-login-field/62883)._
