At first, it has to be seen what the meaning of allegiance is.
Allegiance, is a contract between the ruler and the citizen which is common via referendum and election at the present time. That time the allegiance took placed when the people willingly went and put their own hand in the hand of the ruler
This kind of the allegiance only occurred in the age of the commander of the faithful (peace be upon him) and not to any of the three Caliphs
From the Sunnite point of view, as it has been presented in their own most authentic books, the commander of the faithful (peace be upon him) did not swear allegiance to Abu Bakr during the first 6 months of his Caliphate and only when Her Holiness Fatima Sediqa Taherah was martyred then His Holiness sworn allegiance to him unwillingly and forcefully
Bokhari writes in the Sunnite most authentic book that
وعاشت بعد النبي صلى الله عليه وسلم، ستة أشهر فلما توفيت دفنها زوجها على ليلا ولم يوءذن بها أبا بكر وصلى عليها وكان لعلى من الناس وجه حياة فاطمة فلما توفيت استنكر على وجوه الناس فالتمس مصالحة أبى بكر ومبايعته ولم يكن يبايع تلك الأشهر .
Her Holiness Fatima Zahra (peace be upon her) has lived only for 6 months after the demise of the holy prophet of GOD (peace and bless of GOD be upon him and his progeny) and after she passed away, his husband buried her at night and did not inform Abu Bakr, the Moslem ruler who usually performs the Mayet prayer and His Holiness has not sworn allegiance to Mr. Abu Bakr during these 6 months
-Sahih Al-Bokhari v 5 p 82
Imam Ali (peace be upon him) stated in Nahj Al-Balaqah in the letter 28 that
إنّي كنت أقاد كما يقاد الجمل المخشوش حتى أبايع .
They carried me by dragging from my house to the mosque just like to halter a camel with no chance of escape
And it is interesting that, he says when the commander of the faithful (peace be upon him) entered the mosque they said; swear allegiance to Abu Bakr and His Holiness stated that; what will happen if I do not wear allegiance? They said; we swear to GOD we will cut your head off then His Holiness stated that; you are going to kill the servant Allah the Almighty and the brother of the holy prophet of GOD and Abu Bakr remained silent and said nothing
فقالوا له : بايع . فقال : إن أنا لم أفعل فمه ؟ ! قالوا : إذا والله الذي لا إله إلا هو نضرب عنقك ! قال : إذا تقتلون عبد الله وأخا رسوله . وأبو بكر ساكت لا يتكلم .
Imamate and politics to achieve sherry : 31 , Bab how the allegiance of Ali bin Abi Talib .
And more interestingly that it has been mentioned in the book Ethbat Al-Vasilah Masudi that they carried the commander of the faithful (peace be upon him) by dragging to Mr. Abu Bakr and said you have to swear allegiance. And the hand of Imam Ali (peace be upon him) was not opened and all of them tried to open His Holiness’ hand and then put it in the hand of Abu Bakr but they did not. Then Mr. Abu Bakr step forward and put his own hand on the closed hand of the commander of the faithful (peace be upon him) as the sign of allegiance
فروي عن عدي بن حاتم أنه قال : والله ، ما رحمت أحدا قط رحمتي علي بن أبي طالب عليه السلام حين اتى به ملببا بثوبه يقودونه إلى أبي بكر وقالوا : بايع ، قال : فإن لم أفعل ؟ قالوا : نضرب الذي فيه عيناك ، قال : فرفع رأسه إلى السماء ، وقال : اللهم إني اشهدك أنهم أتوا أن يقتلوني فإنى عبد الله وأخو رسول الله ، فقالوا له : مد يدك فبايع فأبى عليهم فمدوا يده كرها ، فقبض على أنامله فراموا بأجمعهم فتحها فلم يقدروا ، فمسح عليها أبو بكر وهي مضمومة ...
-Esbat Al-VasiatMasoudi p 146; Shafi v 3 p 244; Elm Al-Yaghin v 2 p 386-388; Beit Al-Ahzan Al-MohadethGhomi; 118; Al-Asrar Sheikh Muhammad FazelMasoudi 122; Elm Al-YaghinKashani 686; Maghsad Sales; HojumAlaBeit Fatima; 136;343
According to the Shiite standpoint no allegiance happened even for a second at all
Shakh Mofid states in the book Al-Fosul Al-Mokhtarah, p 56 that
قد اجمعت الأمّة على أن أمير الموءمنين عليهالسلام تأخّر عن بيعة أبي بكر ... والمحققّون من أهل الإمامة يقولون: لم يبايع ساعة قطّ .
Based on the view of the majority of the Moslem people the commander of the faithful (peace be upon him) has not sworn allegiance during these 6 months and the Sunnite scholars say that His Holiness has sworn allegiance but the Shiite researchers believe in this fact that the commander of the faithful (peace be upon him) has not sworn allegiance to the Caliphs even for one hour at all
Therefore, firstly no allegiance has taken place and if it was happened it was against the will of His Holiness rather than reluctantly and forcefully
THE BOARD OF ADDRESSING THE RELIGIOUS DOUBTS
THE RESEARCH INSTITUTE OF HIS HOLINESS VALIASR (IMAM OF THE AGE) MAY GOD PRECIPITATE HIS BLESSING REAPPEARANCE