public IActionResult Authenticate([FromBody] AlphahomeUser userInfo) { IActionResult response = Unauthorized(); var ipAdress = ipAddress(); var result = _alphahomeService.Authenticate(userInfo, ipAdress); if (result != null) { setTokenCookie(result.RefreshToken); return(Ok(result)); } else { return(response); } }