# مساعدة في تمرير عنوان URL للمصدر لتسجيل الدخول الموحد (SSO)

**URL:** <https://meta.discourse.org/t/help-passing-source-url-for-sso/103559>\
**Category:** Support\
**Created:** [5 ديسمبر 2018، 5:13م UTC](https://meta.discourse.org/t/help-passing-source-url-for-sso/103559 "2018-12-05T17:13:14Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![moebis](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moebis/32/555233_2.png) [@moebis](https://meta.discourse.org/u/moebis)\
**Post date:** [5 ديسمبر 2018، 5:13م UTC](https://meta.discourse.org/t/help-passing-source-url-for-sso/103559/1 "2018-12-05T17:13:14Z")

</div>

We have an issue when users click on a piece of protected content (like a shared link in Twitter) and they are not logged in. The go to our memberful login page (SSO) and come back to the root categories, not the original item they clicked on. This seems like it should be built in somehow. Memberful suggested I reach out to the community:

> On the SSO side of things we don’t know the page the user was originally trying to access that was protected, in the case of Discourse we redirect to the " _/session/sso\_login_ " endpoint after a successful login. Discourse then checks the value of the destination cookie ([https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/controllers/login.js.es6#L148](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/controllers/login.js.es6#L148)) it stored to determine where to send the user, and in this case the cookie on your installation of Discourse is either being unset or set to “[https://community.intelligentfanatics.com/latest](https://community.intelligentfanatics.com/latest)” as that was the page where the SSO login was triggered from.
> 
> None of the settings you suggested seem to solve this issue, it looks like a code change will be required in Discourse to set the destination cookie differently if you are redirected to another page before the SSO is called. If this feature is essential it might be worth contacting the Discourse team on their development discussion.

Any help, much appreciated! Maybe it’s a simple setting somewhere I’m missing.

---

_[View the full topic](https://meta.discourse.org/t/help-passing-source-url-for-sso/103559)._
