<div style="display: flex; flex-wrap: wrap; white-space: pre-wrap; align-items: center; "><img height="20" width="20" style="border-radius:50%; margin-right: 4px;" decoding="async" src="https://avatars.githubusercontent.com/u/147741?s=20&v=4" /><strong>tomhughes</strong> left a comment <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2799#issuecomment-3156472926">(openstreetmap/openstreetmap-website#2799)</a></div>
<p dir="auto">So I now have the necessary keys to test things out locally and there's a bit of a hickup... Apple insist on using <code class="notranslate">response_mode=form_post</code> in the OAuth 2 exchange if you want to ask for the <code class="notranslate">name</code> or <code class="notranslate">email</code> scopes but that means the callback comes as a cross domain POST request which means we don't get our session cookie because it is marked <code class="notranslate">SameSite=lax</code> and that means we can't validate the OAuth state as that is in the session.</p>
<p dir="auto">I can make it work by doing one of two things:</p>
<ul dir="auto">
<li>Drop the <code class="notranslate">name</code> and <code class="notranslate">email</code> scopes from our request, and use <code class="notranslate">response_mode=query</code></li>
<li>Switch our session cookie to <code class="notranslate">SameSite=none</code> which reduces our cookie security</li>
</ul>
<p dir="auto">I assume think <code class="notranslate">response_mode=form_post</code> is more secure for some reason but it's not clear why as the actual name/email data is not passed in that request and the end result is that we have to reduce our cookie security 😢</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/2799#issuecomment-3156472926">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLLJ3QOKHYD2S42ULS33MEE5ZAVCNFSM6AAAAAB4J2VE6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCNJWGQ3TEOJSGY">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLMTC7VEBRM22CDN3WL3MEE5ZA5CNFSM6AAAAAB4J2VE6SWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTV4EP2F4.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/2799/3156472926</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/2799#issuecomment-3156472926",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2799#issuecomment-3156472926",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>