0👍
In my opinion, you could not get the windows user in vue js. if you want to get the windows user identity in .net core site you could use below code:
In ConfigureServices
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
In controller
private readonly IHttpContextAccessor _httpContextAccessor;
public HomeController(IHttpContextAccessor httpContextAccessor)
{
_httpContextAccessor = httpContextAccessor;
string userName = _httpContextAccessor.HttpContext.User.Identity.Name;
}
- [Vuejs]-Props being mutated in VueJS
- [Vuejs]-How get one single component (carousel) from element-ui if is imported as global config object?
Source:stackexchange.com