# SSO avatar does not refresh as expected

**URL:** https://meta.discourse.org/t/sso-avatar-does-not-refresh-as-expected/131422
**Category:** SSO
**Created:** [October 19, 2019, 5:50am UTC](https://meta.discourse.org/t/sso-avatar-does-not-refresh-as-expected/131422 "2019-10-19T05:50:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Valentin\_Lungu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/valentin_lungu/32/158342_2.png) [@Valentin\_Lungu](https://meta.discourse.org/u/Valentin_Lungu)
#### Post date: [October 19, 2019, 5:50am UTC](https://meta.discourse.org/t/sso-avatar-does-not-refresh-as-expected/131422/1 "2019-10-19T05:50:34Z")

</div>

We have set up SSO login for our forum, but the user’s avatar icon does not update as we expect it to:

When changing the avatar in our SSO provider we send the following payload to our discourse server:

```plaintext
$encodedPayload = base64_encode(
	$decodedPayload
	. '&return_sso_url=' . env('DISCOURSE_SSO_URL')
	. '&email=' . auth()->user()->email
	. '&primary_email=' . auth()->user()->email
	. '&external_id=' . auth()->user()->id
	. '&name=' . auth()->user()->name
	. '&username=' . auth()->user()->nickname
	. '&avatar_url=' . auth()->user()->avatar
	. '&avatar_force_update=true'
	. '&admin=' . (auth()->user()->isAdmin ? 'true' : 'false')
);

```

If vieewing a discourse forum page, the avatar does not change (this is expected), however it does not change when refreshing the respective page or navigating to a new one (although we can see in the console that it has already pulled the new image).

We need to log out and log back in for it to change.

If the avatar changes, a new filename is generated for it, and we always send the avatar\_force\_update as true.

Is there anything we’re missing?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [October 21, 2019, 4:32pm UTC](https://meta.discourse.org/t/sso-avatar-does-not-refresh-as-expected/131422/2 "2019-10-21T16:32:44Z")

</div>

If you enable the Discourse `verbose sso logging` site setting, are you seeing the `avatar_force_update` parameter in the SSO logs for the first login after a user changes their avatar on the SSO provider site?
