Recent results from the Pierre Auger Observatory suggest that there might be a significant heavy component in high energy cosmic rays. It is therefore interesting to explore the possibility to accelerate not only protons but also complex nuclei in relativistic jets. We have investigated the acceleration of a mixed composition of cosmic rays in GRBs internal shocks, taking into account all the relevant energy loss mechanisms during the acceleration process. Three dimensional trajectories during the relativistic Fermi cycles are derived inspired by the work done by Niemiec and Ostrowski (04), and using the model of Daigne and Mochkovitch (98,02) to model GRBs internal shocks. We calculate the cosmic rays escaping from the GRB environment but also secondary photons and neutrinos - produced both during the acceleration process and the UHECRs extragalactic propagation. The conditions for the GRBs to be sources of UHECRs as well as the role of the key physical parameters (magnetic fields, composition, equipartition factors) will be discussed.