<p></p>
<ul dir="auto">
<li>My frontend application is running on localhost:3000</li>
<li>My OAuth2 redirect URI is 127.0.0.1/authorized</li>
<li>Authorization is done by opening a new popup window after the user clicks on the login button on my application. After authorization is complete user needs to be redirected to the main application tab closing the popup window with the granted code where the code can be exchanged with an access token.</li>
</ul>
<p dir="auto">Where I am getting CORS is during redirecting the user to the main application tab after the authorization code is obtained.<br>
<a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/67958673/180406749-fc8b2f07-7964-4eba-89ca-fd986a3556e0.png"><img src="https://user-images.githubusercontent.com/67958673/180406749-fc8b2f07-7964-4eba-89ca-fd986a3556e0.png" alt="cors_error_oauth" style="max-width: 100%;"></a></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/3613#issuecomment-1192361287">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLOVCXSLBFJOTLFXFGTVVJRDXANCNFSM54KGTK4A">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLMP4IKSSSSQOFYDPTDVVJRDXA5CNFSM54KGTK4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOI4I72RY.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/3613/1192361287</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/3613#issuecomment-1192361287",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/3613#issuecomment-1192361287",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>