<p></p>
<p dir="auto">So I tried this out in <a href="https://gist.github.com/mmd-osm/a8edb405918795d7d823b9088bd12f41">https://gist.github.com/mmd-osm/a8edb405918795d7d823b9088bd12f41</a> and replaced the static list by some checkboxes. You can deselect some of the scopes before authorizing the request, and resulting token would only include the exact list of scopes which have been selected.</p>
<blockquote>
<p dir="auto">Well the problem is that you can't (with our implementation at least) just request multiple tokens because the server aggregates all authorisations for a given client, so when you try and get a new token it will see the existing authorisation and return a token for it without asking the user to authorise again.</p>
</blockquote>
<p dir="auto">I think on the UI, you would indeed only see a single entry per application. However, on the database there are several tokens for each distinct set of scopes. To be honest, that's a bit confusing for a user. I haven't checked which of the different tokens is shown on /oauth2/authorized_applications in the end.</p>
<p dir="auto"><a href="https://github.com/openstreetmap/openstreetmap-website/assets/5842757/90b6e3a0-f454-44c0-8ed8-eeb3d08e56ed">image.png (view on web)</a></p>
<p dir="auto">There's another issue here. Since a few weeks, I'm getting the /oauth2/authorize "Authorization Required" dialog, even if I have previously authorized the app. If I'm not completely mistaken, this used to be different in the past. Maybe the recent addition of openid has changed the default behavior?</p>
<p dir="auto">Now with this dialog showing up all the time, it would be good, if the checkboxes would reflect the previous scope selection. Otherwise this is getting fairly annoying for users to deselect some scopes each time. I haven't really looked into this part yet, but I believe it might be useful to do so.</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/issues/4360#issuecomment-1962909343">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLIUUHEYTL5GWFM6IDTYVMQ6LAVCNFSM6AAAAAA7VAIXTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSHEYDSMZUGM">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLPINUFHFNZ7PPYJG4LYVMQ6LA5CNFSM6AAAAAA7VAIXTOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTU76PJ6.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/issues/4360/1962909343</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/issues/4360#issuecomment-1962909343",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/4360#issuecomment-1962909343",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>