# Add link to external SSO profile to profile page

**URL:** <https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027>\
**Category:** Support\
**Created:** [2017年三月13日 21:33 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027 "2017-03-13T21:33:46Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2017年三月13日 21:33 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027/1 "2017-03-13T21:33:46Z")

</div>

If you use SSO and profile settings are controlled by another site, it’s confusing that you cannot change them on your profile page.

Can someone show me how to add something like a “Edit Profile on SITE” button to the nav menu on the user preferences page?

Or, is there some better idea?

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2017年三月13日 21:42 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027/2 "2017-03-13T21:42:10Z")

</div>

Being a parent (authentication site) entails so many responsibilities, Jay!

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2017年三月13日 21:43 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027/3 "2017-03-13T21:43:31Z")

</div>

That’s so true. It would be nice, though, if the child had a way to tell people just where its parent was.

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [2017年三月13日 21:47 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027/4 "2017-03-13T21:47:37Z")

</div>

I had a site like that, and the only thing that users had to change on parent was the avatar. I went with a site customization of the preferences template that changed the avatar button (the little pencil) to a link to the outsite avatar service.

[https://meta.discourse.org/t/how-to-customize-discourse-templates/34813?u=falco](https://meta.discourse.org/t/how-to-customize-discourse-templates/34813)

You need to check for changes on the original template on every update tough.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2017年三月13日 21:51 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027/5 "2017-03-13T21:51:25Z")

</div>

Perhaps we should have an easier way to make that happen? Some kind of button that says

Hey if you want to change any of this click here on this GIANT BUTTON to go to your profile page on the parent site

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2017年三月13日 22:00 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027/6 "2017-03-13T22:00:38Z")

</div>

At SP we customized a template to tell our users that too when we switched to SSO. I’ll see if I can find it here in a moment.

Here it is

> <https://github.com/sitepoint/discourse-theme/blob/master/assets/javascripts/discourse/templates/connectors/above-user-preferences/sso_notice.hbs>

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2017年三月13日 22:13 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027/7 "2017-03-13T22:13:27Z")

</div>

Yeah. That seems good. So then I’d somehow customize the template [like this](https://meta.discourse.org/t/how-to-customize-discourse-templates/34813?source_topic_id=59027)?

Or submit a PR with something like @cpradio’s changes merged into [https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/preferences.hbs](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/templates/preferences.hbs)?

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2017年三月13日 22:23 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027/8 "2017-03-13T22:23:58Z")

</div>

Yeah, I was about to say that myself. It seems we customized that in our fork. Oops.  
I’ll bet a PR to add that will be received well. I’ll see what I can do here in a bit.

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2017年三月13日 22:34 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027/9 "2017-03-13T22:34:55Z")

</div>

PR Submitted (ping @nec286)  
[https://github.com/discourse/discourse/pull/4753](https://github.com/discourse/discourse/pull/4753)

@pfaffman, you would use this #howto to implement it via a site customization (also see example below)

> [@Using Plugin Outlet Connectors from a Theme or Plugin](https://meta.discourse.org/t/adding-plugin-outlets-using-site-customizations/32727):
>
> Discourse includes hundreds of Plugin Outlets which can be used to inject new content or replace existing contend in the Discourse UI. ‘Outlet arguments’ are made available so that content can be customized based on the context. Choosing an outlet To find the name of a plugin outlet, search Discourse core for “\<PluginOutlet”, or use the [plugin outlet locations](https://meta.discourse.org/t/plugin-outlet-locations-theme-component/100673) theme component. (e.g. topic-above-posts). Wrapper outlets Some outlets in core look like \<PluginOutlet @name="foo" /\>. These allow you…

```plaintext
<script type='text/x-handlebars' data-template-name='/connectors/above-user-preferences/sso_notice'>
{{#if siteSettings.enable_sso}}
  modified contents of connectors/above-user-preferences/sso_notice.hbs file goes here
{{/if}}
</script>  

```

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2017年三月13日 23:47 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027/10 "2017-03-13T23:47:26Z")

</div>

Thanks, @cpradio. That seems like what I want.

Oh, and now I think that I understand that this won’t work until your PR has been accepted?

Otherwise, I thought that if I paste this into `/admin/customize/css_html/` in the `</head> tag`.

```plaintext
<script type='text/x-handlebars' data-template-name='/connectors/above-user-preferences/sso_notice'>
{{#if siteSettings.enable_sso}}
  <div class="alert alert-info">
      <p>MY FANTASTIC TEXT.</p>
    </div> 
{{/if}}
</script> 

```

But that isn’t showing up on /users/pfaffman/preferences.

And then I tried

```plaintext
<script type='text/x-handlebars' data-template-name='/connectors/above-user-preferences/sso_notice'>
  <div class="alert alert-info">
      <p>MY FANTASTIC TEXT.</p>
  </div> 
</script> 

```

And still no joy.

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2017年三月13日 23:50 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027/11 "2017-03-13T23:50:19Z")

</div>

Correct. My PR is necessary for it to work. I didn’t realize that outlet was in our fork ☹

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2017年三月13日 23:52 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027/12 "2017-03-13T23:52:05Z")

</div>

Aha! I finally (kinda sorta thought that maybe I had) figured that out.

Thanks again.

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2017年三月14日 15:07 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027/13 "2017-03-14T15:07:43Z")

</div>

@pfaffman, this is now merged, so let me know if it still doesn’t work after you update to latest. 🙂

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2017年三月14日 16:45 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027/14 "2017-03-14T16:45:35Z")

</div>

It works! It works! Thanks @cpradio. Discourse 1.8.0.beta7.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2017年三月14日 17:33 UTC](https://meta.discourse.org/t/add-link-to-external-sso-profile-to-profile-page/59027/15 "2017-03-14T17:33:44Z")

</div>


