<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[localhost development cookie issue]]></title><description><![CDATA[<p dir="auto">I am developing a SPA with react. I am having an issue while developing locally, i.e. on my localhost, the app is talking to FusionAuth and a service that is performing PKCE which are running remotely. I am having issues with the cookies being set. The cookies that are returned from the backend have a domain which is not localhost so they are dropped after the authentication and redirect.</p>
<p dir="auto">How do I develop locally with this set-up, redirect back to localhost after authentication  and retain the cookies?</p>
]]></description><link>https://fusionauth.io/community/forum/topic/2378/localhost-development-cookie-issue</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 13:51:25 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/2378.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 27 Apr 2023 15:56:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to localhost development cookie issue on Thu, 18 May 2023 00:51:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/2408">@jacksontrevan</a> Yes, this is unfortunately a limitation of cookies.</p>
<p dir="auto">You could work around that by setting up a DNS alias to <a href="http://local.example.com" rel="nofollow ugc">local.example.com</a> (assuming FusionAuth is running remotely at <a href="http://auth.example.com" rel="nofollow ugc">auth.example.com</a>).</p>
<p dir="auto">You can usually set that up by googling for <code>local host in /etc/hosts &lt;platform&gt;</code> which turns up:</p>
<ul>
<li><a href="https://www.hostinger.com/tutorials/how-to-edit-hosts-file-macos" rel="nofollow ugc">https://www.hostinger.com/tutorials/how-to-edit-hosts-file-macos</a></li>
<li><a href="https://www.manageengine.com/network-monitoring/how-to/how-to-add-static-entry.html" rel="nofollow ugc">https://www.manageengine.com/network-monitoring/how-to/how-to-add-static-entry.html</a></li>
</ul>
]]></description><link>https://fusionauth.io/community/forum/post/6151</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/6151</guid><dc:creator><![CDATA[dan]]></dc:creator><pubDate>Thu, 18 May 2023 00:51:52 GMT</pubDate></item><item><title><![CDATA[Reply to localhost development cookie issue on Mon, 08 May 2023 13:20:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/2417">@vinicius-campitelli</a> The issue is with the our backend setting the final cookies, <a href="http://app.at" rel="nofollow ugc">app.at</a>, app.idt, app.at_exp in one domain after authentication, then having the application redirect back to localhost and retain the cookies. In other words I am trying to authenticate as a user and develop on localhost, however after authentication the cookies are no longer accessible when I redirect back to localhost.</p>
]]></description><link>https://fusionauth.io/community/forum/post/6128</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/6128</guid><dc:creator><![CDATA[jacksontrevan]]></dc:creator><pubDate>Mon, 08 May 2023 13:20:13 GMT</pubDate></item><item><title><![CDATA[Reply to localhost development cookie issue on Wed, 03 May 2023 20:44:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/2408">@jacksontrevan</a></p>
<p dir="auto">Hi there!</p>
<p dir="auto">Can you please elaborate?</p>
<p dir="auto">In the Authorization Code grant flow with PKCE:</p>
<ol>
<li>Your backend generates a <code>code challenge</code> and a <code>code verifier</code> <em>(which should be stored in your side, either in cookies or server session)</em></li>
<li>Your application takes the user to FusionAuth's <code>/oauth2/authorize</code> endpoint with <code>redirect_url</code>, <code>code_challenge</code> and other parameters</li>
<li>User logs in</li>
<li>FusionAuth redirects the user back to the provided <code>redirect_url</code> <em>(your backend)</em> with an <code>authorization code</code></li>
<li>Your backend sends a request to FusionAuth's <code>/oauth2/token</code> endpoint with the received <code>authorization code</code> and the <code>code verifier</code></li>
<li>FusionAuth compare code verifier and challenge and returns an <code>access token</code></li>
<li>You can now use that <code>access token</code> to call your API or other resources</li>
</ol>
<p dir="auto">So which cookies are you trying to retrieve? In that flow, the backend would only need to store the <code>code verifier</code> in cookies during step 1.</p>
]]></description><link>https://fusionauth.io/community/forum/post/6119</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/6119</guid><dc:creator><![CDATA[vinicius.campitelli]]></dc:creator><pubDate>Wed, 03 May 2023 20:44:49 GMT</pubDate></item></channel></rss>