Customer Service Representatives UI and OWIN?

Vote:
 

Hi,

I'm trying out the new beta of "Customer Service Representatives UI" but when fetching data from "https://..../EPiServer.Commerce.UI.CustomerService//countries" I get a 401 unauthorized response.

The user is a member of the CustomerServiceRepresentatives group and EPiBetaUsers and the feature-switch-config is set to "Enabled".

Is OWIN not supported for the CSR UI or have I simply done something wrong during the setup?

Have anybody else got this to work?

Kind regards,
Mikael

#200934
Jan 31, 2019 8:35
Vote:
 

CSR uses WebAPI controller. If your OWIN setup supress the host authentication cookie (i.e. remove it), then your users will be unauthenticated when trying to access those controllers. 

#200942
Jan 31, 2019 11:20
Vote:
 

Sorry for the late feedback and thanks for your answer Quan!

It led me in the right direction.

To resolve my issue I had to add an additional HostAuthenticationFilter to handle cookies and bearer tokens using the following line:

config.Filters.Add(new HostAuthenticationFilter(DefaultAuthenticationTypes.ApplicationCookie));

#201428
Feb 19, 2019 11:00
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.