Use a more secure method to generate tokens