<p></p>
<p><b>@milan-cvetkovic</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4226#discussion_r1317097659">config/initializers/doorkeeper_openid_connect.rb</a>:</p>
<pre style='color:#555'>> +
+Doorkeeper::OpenidConnect.configure do
+ issuer do |_resource_owner, _application|
+ "https://www.openstreetmap.org/oauth2"
+ end
+
+ signing_key Settings.doorkeeper_signing_key
+
+ subject_types_supported [:public]
+
+ resource_owner_from_access_token do |access_token|
+ # Example implementation:
+ User.find_by(:id => access_token.resource_owner_id)
+ end
+
+ auth_time_from_resource_owner do |resource_owner|
</pre>
<p dir="auto">It looks like <code class="notranslate">auth_time_from_resource_owner</code> needs to exist even if empty, otherwise there is an error originating in <a href="https://github.com/doorkeeper-gem/doorkeeper-openid_connect/blob/5987683ccc22262beb6e44c76ca4b65288d6067a/lib/doorkeeper/openid_connect/id_token.rb#L68">id_token.rb</a>:</p>
<pre class="notranslate"><code class="notranslate">Doorkeeper::OpenidConnect::Errors::InvalidConfiguration - Failure due to Doorkeeper::OpenidConnect.configure.auth_time_from_resource_owner missing configuration.:
</code></pre>
<p dir="auto"><code class="notranslate">reauthenticate_resource_owner</code> is used for <code class="notranslate">prompt=login</code> oidc parameter. If not present, or not functional (empty block is not functional) 500 error is triggered.<br>
<code class="notranslate">select_account_for_resource_owner</code> is used for <code class="notranslate">prompt=select_account</code> oidc parameter. If not present, 500 error is triggered due to missing configuration (similar to the error as above). If empty body, it silently does not offer a selection list, but uses regular login flow.</p>
<p dir="auto">I think it is safe to remove the latter two empty blocks.</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/4226#discussion_r1317097659">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJTOR5MO4GTFOVASV3XZBIGHANCNFSM6AAAAAA4KPKL4I">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLPZUECOOIKQPQKX4R3XZBIGHA5CNFSM6AAAAAA4KPKL4KWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTTAEUIH2.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/4226/review/1613041789</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/4226#discussion_r1317097659",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4226#discussion_r1317097659",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>