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:
ICMJE guidelines:

Post by Gareth Dyke, Editor-in-Chief of Biosis: Biological Systems (Published by EAPG), and Historical Biology (Published by Taylor and Francis).