<p></p>
<p dir="auto">Here's what I'd try to do first:</p>
<p dir="auto">what's already happening:</p>
<ul dir="auto">
<li>when a user without an osm account tries tries to authorize from some app, they first are directed to <code class="notranslate">/oauth2/authorize</code></li>
<li>since the user is not logged in, they are redirected to the login page</li>
</ul>
<p dir="auto">changes:</p>
<ul dir="auto">
<li>On the login page we detect if it was a redirect from oauth. If it was, a regular registration link is replaced with a link that opens in a new browser window.</li>
<li>we add a message near the link telling the user to complete the registration in that other window and return to the original window after that</li>
<li>instead of a redirect url, we add some parameter to our new link that indicates that the user came from oauth</li>
<li>if a email confirmation is used, this parameter is stored in the token accessible with the confirmation link</li>
<li>when the welcome is reached, it has a "start mapping" link that normally uses the stored redirect. Instead, if we have the "came from oauth" parameter, we put there a message to return to the original window to continue the oauth flow</li>
<li>the original page doesn't know that the registration was complete until it's reloaded, so we also tell the user to reload it once they are registered</li>
<li>reloading with the usual browser controls may not be possible if the window is fully controlled by the app, so we may place a reload button there</li>
</ul>

<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/4246#issuecomment-1749328991">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJA72PETO6C7JQCPRLX53SU7AVCNFSM6AAAAAA4WTGC3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBZGMZDQOJZGE">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLVSQCHUB5GZQC6PUDX53SU7A5CNFSM6AAAAAA4WTGC3OWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTIISSF6.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/4246/1749328991</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/4246#issuecomment-1749328991",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/4246#issuecomment-1749328991",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>