Forum Discussion

Nageswara5599's avatar
2 days ago

Lab not getting complete even it is correct

I am working on C# / ASP.NET API from the I am doing ASP.NET Core API: Username Enumeration lab, this lab task 1 is always showing incomplete even after  I am generating correct results 

[HttpPost("login")]

public ActionResult<LoginResponse> LoginUser(LoginRequest request)

 {

var user = _repository.GetUserByEmail(request.Email); 

var passwordValid = _hashingService.VerifyPassword( request.Password, user.Password );

 if (user == null || !passwordValid) {

return Unauthorized(); }

 return new LoginResponse { Jwt = _jwtService.GenerateJwt(user.Id, user.Email) };

}

Could you please help? I need to complete this today?

Regards

Nagesh

 

2 Replies

  • ChrisKershaw's avatar
    ChrisKershaw
    Icon for Community Support rankCommunity Support

    Hey Nageswara5599​,

    I'm Chris, I work in the Customer Support Team at Immersive, nice to meet you 👋🏻.

    The good news, is on testing the lab, the exercise is working correctly. Looking at the information you provided, I can see you are currently looking at the section in the Code Editor starting "[HTTPPost("login")]" where instead, you need to be focusing on the section starting "[HttpPost("forgot")]".


    The general command you're trying doesn't match what we are looking for at the moment. My advise would be revisit the "forgot" part of the code editor (lines 83-95) and try updating this again. If it's possible, please can you take a screenshot of your changes from the lab itself and share this back with me, and I'll then have another look into this for you.