Add an optional param with extra data to generateToken