diff --git a/otp/handler/otp.go b/otp/handler/otp.go index f47e35d..316ac92 100644 --- a/otp/handler/otp.go +++ b/otp/handler/otp.go @@ -85,8 +85,13 @@ func (e *Otp) Validate(ctx context.Context, req *pb.ValidateRequest, rsp *pb.Val return errors.InternalServerError("otp.generate", "failed to validate code") } + if !ok { + rsp.Success = false + return nil + } + // set the response - rsp.Success = ok + rsp.Success = true return nil }