Does anyone have tips or tricks for debugging SSO avatar downloading?


(jezra) #1

I’m running Discourse 2.0.3 stable in docker and SSO is working properly with the exception of downloading the provided avatar. When I send the avatar url, I am also sending avatar_force_update=true.

There are no errors showing in /sidekiq or in /logs

For what it is worth, The avatar url sent to discourse is coming from rails ActiveStorage and redirects to an Amazon S3 bucket.

Does anyone have experience with this sort of setup or have any tips to help me debug the issue?


(Rafael dos Santos Silva) #2

This sounds like the main suspect. Can you try using the direct image URL for a change?

What is the response code for Active Storage URLs?


(jezra) #3

Thank you @Falco, based on your suggestion I managed to get avatars working with SSO.

Here is what I learned:
The url to the avatar, as provided by rails activestorage, uses http and results in a 301 redirect to the same url but on https.

When I tested the https avatar path following instructions from SSO avatars not being overridden, the avatar updated as expected. At this point, I modified my code which sets the SSO avatar_url to use the https url, and SSO avatar importing is working.