For some reason that I haven't figured out, the authentication entrypoint is called twice for me whenever a user isn't logged. Since the entrypoint uses addHeader() it will result in two HX-Refresh headers in the response, making htmx ignore the header.
Even though there's probably something wrong with my code, changing it to use setHeader() will work around this and make sure there is only one HX-Refresh header in the response, making htmx behave as it should.
For some reason that I haven't figured out, the authentication entrypoint is called twice for me whenever a user isn't logged. Since the entrypoint uses
addHeader()
it will result in twoHX-Refresh
headers in the response, making htmx ignore the header.Even though there's probably something wrong with my code, changing it to use
setHeader()
will work around this and make sure there is only oneHX-Refresh
header in the response, making htmx behave as it should.And thank you for a great library!