OAuth Userinfo Endpoint

Hello All,

Using this link https://frappeframework.com/docs/v13/user/en/guides/integration/rest_api/oauth2#openid-user-info-endpoint, to get the userinfo post OAuth integration with frappe.

There are two questions:

  1. The above end point when actually called in the integration returns
{"sub":"xxxxx","name":"Name","given_name":"Name","family_name":null,"email":"email@gmail.com","picture":null}

The other parameters are not returned (as documented in the above link).
2) Can we configure to return any additional information with the userinfo from frappe ?

Thank you

Latest stable v13 should not cause this problem.

curl https://erp.example.com/api/method/frappe.integrations.oauth2.openid_profile -H 'Authorization: Bearer AcCeSstOkEn' | jq .
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   790  100   790    0     0   3157      0 --:--:-- --:--:-- --:--:--  3147
{
  "sub": "********",
  "name": "Revant Nandgaonkar",
  "given_name": "Revant Nandgaonkar",
  "family_name": null,
  "email": "*********",
  "picture": "*********",
  "roles": [
    "Accounts Manager",
    "Knowledge Base Contributor",
    "Purchase User",
    "Website Manager",
    "Accounts User",
    "Sales Master Manager",
    "Blogger",
    "Inbox User",
    "System Manager",
    "Report Manager",
    "Newsletter Manager",
    "Dashboard Manager",
    "Maintenance User",
    "Sales User",
    "Script Manager",
    "Prepared Report User",
    "Purchase Manager",
    "Translator",
    "Maintenance Manager",
    "Purchase Master Manager",
    "Knowledge Base Editor",
    "Sales Manager",
    "All",
    "Guest"
  ],
  "iss": "http://erp.example.com"
}

If you’ve a custom app then override the whitelisted function from hooks.py