Confused about authorship on academic papers? The best thing to do is always discuss and decide on these issues before starting to write articles. Arguments and issues to do with academic paper authorship are hard to resolve once papers have been written and even harder to resolve once accepted.
Most of the journals follow these guidelines, they both are worth reading:
COPE guidelines: https://publicationethics.org/authorship
ICMJE guidelines: http://www.icmje.org/recommendations/browse/roles-and-responsibilities/defining-the-role-of-authors-and-contributors.html
Post by Gareth Dyke, Editor-in-Chief of Biosis: Biological Systems (Published by EAPG), and Historical Biology (Published by Taylor and Francis).