Shi 'ism differs from the Sunni tradition in a handful of important ways -- not only in its belief in who was the legitimate heir to the Prophet Muhammad 's leadership of the community of the faithful after his death , but also in its attitudes toward political authority and devotion .