Can't get avatar overrides to work over SSO

I can’t get the avatar overrides to work over SSO.

My SSO procedure works fine in all other respects. I am able to override a user’s full name, for example, but not the avatar.

Here are the parameters I’m passing (in addition to the nonce, user id and email):

array:4 [▼
  "username" => "aarmstrong"
  "name" => "Alex Armstrong"
  "avatar_force_update" => true
  "avatar_url" => "http://www.amicalnet.dev/assets/img/uploads/alehandrof-profile-pic.jpg"
]

I have sso overrides avatar enabled. I have automatically download gravatars, allow uploaded avatars and external system avatars enabled disabled.

I’ve read every the main topic about SSO as well as all topics about avatars and SSO that I could find, but I don’t see what I might be doing wrong.

In case it matters, I’m doing this locally. So Discourse, using Vagrant, is at http://localhost:4000 and my site is at http://www.amicalnet.dev. I’m using cviebrock’s PHP SSO helper.

I’m out of things to try. Any ideas?

And, in case it helps more, here’s the verbose SSO log:

Verbose SSO log: User was logged on alex

nonce: <stuff>
name: Alex Armstrong
username: aarmstrong
email: <my email>
avatar_url: http://www.amicalnet.dev/assets/img/uploads/alehandrof-profile-pic.jpg
avatar_force_update: true
require_activation: 
about_me: 
external_id: <stuff>
return_sso_url: 
admin: 
moderator: 
suppress_welcome_message: 

I can’t, for the life of me, understand why, but non-local avatar URLs work fine.

I wish trying this out had occurred to me, oh, about five days ago :smiley:

Edit: maybe related to this → Having issues downloading avatars from localhost

1 Like