The ICMJE recommends that authorship be based on the following 4 criteria:
In addition to being accountable for the parts of the work done, an author should be able to identify which co-authors are responsible for specific other parts of the work. In addition, authors should have confidence in the integrity of the contributions of their co-authors.
ICMJE | Recommendations | Defining the Role of Authors and Contributors