Use a consistent http and oidc clients Use the access token to send an a authenticated request to retrieve avatar and do it at the same time as requesting the userinfo endpoint Merge JTokens instead of re-parsing json strings to merge configuration