# Oauth2 plugin: avatar not used

**URL:** <https://meta.discourse.org/t/oauth2-plugin-avatar-not-used/295121>\
**Category:** SSO\
**Tags:** oauth2\
**Created:** [February 12, 2024, 8:39pm UTC](https://meta.discourse.org/t/oauth2-plugin-avatar-not-used/295121 "2024-02-12T20:39:40Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![jmlord](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jmlord/32/354569_2.png) [@jmlord](https://meta.discourse.org/u/jmlord)\
**Post date:** [February 12, 2024, 8:39pm UTC](https://meta.discourse.org/t/oauth2-plugin-avatar-not-used/295121/1 "2024-02-12T20:39:40Z")

</div>

Hi,

I’m splitting into a topic an issue referenced here [Discourse OAuth2 Basic - #304 by nodomain](https://meta.discourse.org/t/discourse-oauth2-basic/33879/304)  
here [Discourse OAuth2 Basic - #316 by jmlord](https://meta.discourse.org/t/discourse-oauth2-basic/33879/316) (that’s me)  
and maybe here [User avatar not updating on re-log in](https://meta.discourse.org/t/user-avatar-not-updating-on-re-log-in/268071)

The account is created successfully but the avatar is not included. Sample response:

```plaintext
Body: {
  "access_token":"...",
  "token_type":"bearer",
  "expires_in":"3600",
  "scope":"profile",
  "profile" : {
    "id":1234,
    "email": "...",
    "name": "...",
    "picture": "https://somedomain.com/somevalidpicture.jpg"
  }
} 

```

Variable `oauth2 callback user info paths` includes value `avatar:profile.picture` and it is correctly parsed, since it appears in the following log:

```plaintext
OAuth2 Debugging: after_authenticate response: 

creds: {"token"=>"...", "expires_at"=>1702053692, "expires"=>true}
uid: 1234
info: {"email"=>"...", "name"=>"...", "avatar"=>"https://members.geobon.org/pages/profile-picture/..."}
extra: {}

```

I checked that the picture address is correct, and it’s size is 300x300. Here is a [sample](https://members.geobon.org/pages/profile-picture/62146-17077.jpg).

I checked the logs of the server where the pictures lie, and there was no attempt to download this picture during account creation and initial login.

Any idea why this does not work for us? (clearly it works with some other configs…)

---

_[View the full topic](https://meta.discourse.org/t/oauth2-plugin-avatar-not-used/295121)._
