# Desired URL lost if \`login required\` is enabled and social logins are used

**URL:** <https://meta.discourse.org/t/desired-url-lost-if-login-required-is-enabled-and-social-logins-are-used/71887>\
**Category:** Bug\
**Created:** [11. Oktober 2017 um 23:17 UTC](https://meta.discourse.org/t/desired-url-lost-if-login-required-is-enabled-and-social-logins-are-used/71887 "2017-10-11T23:17:29Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [3. Januar 2018 um 04:47 UTC](https://meta.discourse.org/t/desired-url-lost-if-login-required-is-enabled-and-social-logins-are-used/71887/5 "2018-01-03T04:47:08Z")

</div>

This works properly with SSO for login-required forums. The original link is passed as `session[:destination_url]` to `/session/sso` and then saved. It also works if you create an external SSO link with a `return_path` parameter:

`http://forum/example.com/session/sso?return_path=http://forum.example.com/t/test-topic/123`

---

_[View the full topic](https://meta.discourse.org/t/desired-url-lost-if-login-required-is-enabled-and-social-logins-are-used/71887)._
