<p></p>
<p><b>@ENT8R</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6429#discussion_r2408011448">test/integration/oauth2_test.rb</a>:</p>
<pre style='color:#555'>> @@ -110,7 +110,7 @@ def test_openid_connect
     end
 
     assert_equal user.id.to_s, data["sub"]
-    assert_not data.key?("preferred_username")
</pre>
<p dir="auto">I was also confused why the preferred_username is not in the id token but apparently all custom claims defined in the configuration are only returned by the userinfo endpoint and not added to the id token, if not specified explicitly otherwise:</p>
<blockquote>
<p dir="auto">By default all custom claims are only returned from the UserInfo endpoint and not included in the ID token. You can optionally pass a response: keyword with one or both of the symbols :id_token or :user_info to specify where the claim should be returned.</p>
</blockquote>
<p dir="auto"><sup><i><a href="https://github.com/doorkeeper-gem/doorkeeper-openid_connect#claims">https://github.com/doorkeeper-gem/doorkeeper-openid_connect#claims</a></i></sup></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6429#discussion_r2408011448">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPBA72ZGGXEZZOEEK33WK3ZDAVCNFSM6AAAAACIK7AFICVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTGMBWGY3TAMRZHE">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLKJ5WGI3Y45VPYBPLL3WK3ZDA5CNFSM6AAAAACIK7AFICWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTWFC7ENW.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/6429/review/3306670299</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/6429#discussion_r2408011448",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6429#discussion_r2408011448",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>