I found the solution to the socket blocking error. The issue was due to 'An operation on a nonblocking socket cannot be completed immediately'. The error occurred because I wasn't using await when fetching data (DB connection). Without await, the code likely took a bit of time, causing the socket error. After adding await, the issue was resolved. like this: var users = await _dbContext.AspNetUsers.FirstOrDefaultAsync(u => u.Email == Credentials.Email); If anyone else is facing the same issue, you can resolve it similarly by ensuring you use await where appropriate.