Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a React App windows Authentication

Web API has been created in .Net with Windows Authentication. When am invoking the API in React APP getting 401 Unauthorized. Web API Works fine in the browser with windows authentication.

axios.get('http://.../.../user/Data')
    .then(function (response) {
      console.log(response);
    })
    .catch(function (error) {
      console.log(error);
    });```
like image 338
Mathan Avatar asked Apr 19 '19 16:04

Mathan


1 Answers

With fetch I set the credentials: include option. Also, I think the Access-Control-Allow-Credentials header needed to be set on the back-end.

I'm a front-end developer so I'm not sure what all went into configuring the back-end for Windows Authentication.

like image 189
go_diego Avatar answered Sep 28 '22 06:09

go_diego