<p></p>
<h3 dir="auto">Description</h3>
<p dir="auto">When registering the OAuth2 application, the only non-HTTPS redirect URI allowed is "<a href="http://127.0.0.1" rel="nofollow">http://127.0.0.1</a>". When running an application locally, many of them automatically launch on 'localhost'. Because I am limited to using "<a href="http://127.0.0.1" rel="nofollow">http://127.0.0.1</a>" as a non-HTTPS redirect URI, this causes a CORS error because my application will be running on localhost and I will be redirected to 127.0.0.1 after OAuth is finished.<br>
As an illustration, while working on Tasking Manager's OAuth2 implementation (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1163652477" data-permission-text="Title is private" data-url="https://github.com/hotosm/tasking-manager/issues/5029" data-hovercard-type="pull_request" data-hovercard-url="/hotosm/tasking-manager/pull/5029/hovercard" href="https://github.com/hotosm/tasking-manager/pull/5029">hotosm/tasking-manager#5029</a>), which by default begins on localhost, we encountered a CORS error and instructed our developers to restart the application on "127.0.0.1" rather than localhost. Similar problems were faced while upgrading the osm-auth library from OAuth1 to OAuth2.</p>
<h3 dir="auto">Screenshots</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/67958673/180381028-245cbb6e-c686-42e7-b5b7-fb41e53eea9e.png"><img src="https://user-images.githubusercontent.com/67958673/180381028-245cbb6e-c686-42e7-b5b7-fb41e53eea9e.png" alt="osm_oauth2_form" 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">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNQKW64NRKDACKILHDVVJAM5ANCNFSM54KGTK4A">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLIT47EOMME6V3C6PLVVJAM5A5CNFSM54KGTK4KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4TSY6YRA.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</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",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/3613",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>