Blocked by CORS policy when redirect to /authorize

Hi dragos,
I am not sure what you mean by “you should redirect the user directly to the endpoint”.

I think I am doing that already
the user request the API http://locaalhost:5000/api/het -----> 302
this api redirects the call to the /authorize end point and this is where I am getting the CORS policy error

only when I call my API from the angular app (origin http://localhost:4200)
if I invoke my API directly from the browser it works. only when it gets invoked from the angular client the redirection doesn’t work.

1 Like