# Discourse OAuth2 Basic

**URL:** https://meta.discourse.org/t/discourse-oauth2-basic/33879
**Category:** Plugin
**Tags:** official, oauth2, auth-plugins, included-in-core
**Created:** [September 29, 2015, 4:27pm UTC](https://meta.discourse.org/t/discourse-oauth2-basic/33879 "2015-09-29T16:27:19Z")
**Posts on this page:** 1
**Showing post:** 316

<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: [December 8, 2023, 4:15pm UTC](https://meta.discourse.org/t/discourse-oauth2-basic/33879/316 "2023-12-08T16:15:50Z")

</div>

The only remaining issue for me now is the same as @nodomain : 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"
  }
} 

```

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://somedomain.com/somevalidpicture.jpg"}
extra: {}

```

I checked that the picture address is correct, and it’s size is 300x300.

Any idea for that one?

Edit: someone just created an account, and it took the picture from Gravatar. Maybe the valid picture in the json gets overriden by a blank result from Gravatar?

---

_[View the full topic](https://meta.discourse.org/t/discourse-oauth2-basic/33879)._
