/download redirect to login loop

4 weeks ago
Hi all,

we moved our store (nop 4.40) to another VM and now "download order note" redirects to login page (even if already logged in) and stays there. It did work on the old VM, I have a feeling I'm missing something simple-stupid, but I can't figure out what it can be.

Any pointers?

TIA
4 weeks ago
Hi
How are you trying to download the order notes?
The redirection only happens if you try to download the order notes from the order you didn't place.
This is the code that checks it

if (await _workContext.GetCurrentCustomerAsync() == null || order.CustomerId != (await _workContext.GetCurrentCustomerAsync()).Id)
    return Challenge();


So are you sure you are logged in as the same customer who placed the order before you are trying to download the order note?
3 weeks ago
That is reported by customers, so yes. Thanks for the pointer to the code