Override profile background via SSO

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.

2 Likes

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

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

6 Likes

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.

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 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.

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.

5 Likes

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

2 Likes

This is … unexpected. Few pointers to debug:

  • Is your Discourse dev environment set up properly? (for reference: macOS dev guide, Ubuntu dev guide.)

  • 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?

5 Likes

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 just now.

5 Likes

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

3 Likes

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