# Override profile background via SSO

**URL:** https://meta.discourse.org/t/override-profile-background-via-sso/41921
**Category:** Feature
**Tags:** pr-welcome
**Created:** [April 2, 2016, 8:37am UTC](https://meta.discourse.org/t/override-profile-background-via-sso/41921 "2016-04-02T08:37:19Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Nuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nuck/32/121732_2.png) [@Nuck](https://meta.discourse.org/u/Nuck)
#### Post date: [April 2, 2016, 8:37am UTC](https://meta.discourse.org/t/override-profile-background-via-sso/41921/1 "2016-04-02T08:37:19Z")

</div>

Profile “backgrounds” or “cover images” are becoming extremely common. Facebook has 'em, Twitter has 'em, MySpace had 'em all the way back in 1997 or whenever it was.

SSO is for integrating with a site. Some of those sites will have profile backgrounds or cover images. Ergo, SSO should provide the ability to override this alongside the ability to override avatars. I assume much of the implementation would be similar.

---

<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: [August 12, 2016, 9:26pm UTC](https://meta.discourse.org/t/override-profile-background-via-sso/41921/2 "2016-08-12T21:26:21Z")

</div>

Before we do this, we’d need to start pulling avatars via SSO first!

---

<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: [August 12, 2016, 9:30pm UTC](https://meta.discourse.org/t/override-profile-background-via-sso/41921/3 "2016-08-12T21:30:54Z")

</div>

We do already 🙂 I don’t mind this being added as well

---

<div class="post-metadata">

### Author: ![pblog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pblog/32/121268_2.png) [@pblog](https://meta.discourse.org/u/pblog)
#### Post date: [January 6, 2017, 10:20am UTC](https://meta.discourse.org/t/override-profile-background-via-sso/41921/4 "2017-01-06T10:20:49Z")

</div>

Hello @sam, Do you know if there has been any development with pulling the profile backgrounds with SSO?  
Photography based sites like ours could benefit from this feature. Thanks.

---

<div class="post-metadata">

### Author: ![misaka4e21](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@misaka4e21](https://meta.discourse.org/u/misaka4e21)
#### Post date: [March 22, 2018, 11:30pm UTC](https://meta.discourse.org/t/override-profile-background-via-sso/41921/5 "2018-03-22T23:30:04Z")

</div>

Hello there, I’m seeking the opportunity to apply for Outreachy internship with Discourse.

I currently maintains a Discourse forum for transgenders with a customized theme and thus have got some UI experience from it. I’m not much familiar with Rails, though.

For my first contribution, I tried adding [this feature](https://meta.discourse.org/t/override-profile-background-via-sso/41921) into the core. However, I stuck in debugging that the job to download profile background can be executed successfully from `rails c`, but not from the `app/models/discourse_single_sign_on.rb`.  
Here is [my code](https://github.com/discourse/discourse/compare/5fec9a4dfe6807e9c562c755a79bd6f0b8ba5433...misaka4e21:sso-profile-background).

I also wondered if this could be used as a contribution for application or I must choose the two plugins listed on the description page.

Sincerely thanks for your help.

---

<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: [March 22, 2018, 11:38pm UTC](https://meta.discourse.org/t/override-profile-background-via-sso/41921/6 "2018-03-22T23:38:38Z")

</div>

> [@Discourse in Outreachy Summer 2018](https://meta.discourse.org/t/discourse-in-outreachy-summer-2018/82945/4):
>
> I also wondered if this could be used as a contribution for application or I must choose the two plugins listed on the description page.

I think it is fine to use it as a contribution for the application.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [March 23, 2018, 2:15pm UTC](https://meta.discourse.org/t/override-profile-background-via-sso/41921/8 "2018-03-23T14:15:16Z")

</div>

> [@Discourse in Outreachy Summer 2018](https://meta.discourse.org/t/discourse-in-outreachy-summer-2018/82945/4):
>
> However, I stuck in debugging that the job to download profile background can be executed successfully from rails c, but not from the app/models/discourse\_single\_sign\_on.rb.

This is … unexpected. Few pointers to debug:

- Is your Discourse dev environment set up properly? (for reference: [macOS dev guide](https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-mac-os-x-macos-for-development/15772), [Ubuntu dev guide](https://meta.discourse.org/t/beginners-guide-to-install-discourse-on-ubuntu-for-development/14727).)

- Is the Sidekiq and Rails application running in different Rails environments?

- Are you seeing any relevant errors in `/logs`?

- Can you verify that other jobs are getting enqueued and executed successfully?

---

<div class="post-metadata">

### Author: ![misaka4e21](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@misaka4e21](https://meta.discourse.org/u/misaka4e21)
#### Post date: [March 23, 2018, 4:08pm UTC](https://meta.discourse.org/t/override-profile-background-via-sso/41921/9 "2018-03-23T16:08:00Z")

</div>

Thank you for the tips.

I found that the `url` argument I used in rails console enqueueing was on a remote site while the `sso_url` set in SiteSetting was one a local one. The function `FileHelper.download` refused to download an image from a site with IP address in private ranges.

I sent [a Pull Request](https://github.com/discourse/discourse/pull/5701) just now.

---

<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: [March 23, 2018, 11:38pm UTC](https://meta.discourse.org/t/override-profile-background-via-sso/41921/10 "2018-03-23T23:38:01Z")

</div>

For security reasons, we almost never want to grab anything from a private IP range.

---

<div class="post-metadata">

### Author: ![Karl\_Romanowski](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/karl_romanowski/32/87676_2.png) [@Karl\_Romanowski](https://meta.discourse.org/u/Karl_Romanowski)
#### Post date: [April 24, 2018, 2:56am UTC](https://meta.discourse.org/t/override-profile-background-via-sso/41921/11 "2018-04-24T02:56:55Z")

</div>

This pr looks like it stalled. Is there another way of doing this via custom fields? Would be a great feature.
