I pledged allegiance to the Messenger of Allah ﷺ along with the people at Hudaybiyyah, then I sat off to one side. When the people had dispersed from around the Messenger of Allah ﷺ, he said, "Ibn al-Akwa, will you not give your pledge?"I replied, "I have already pledged, Messenger of Allah."He said, "Pledge again."I asked, "On what did you all pledge?"He answered, "On death."
قال حدثنا حماد بن مسعدة عن يزيد بن أبي عبيد
بايعت رسول الله ﷺ مع الناس في الحديبية ثم قعدت متنحيا فلما تفرق الناس عن رسول الله ﷺ قال يا ابن الأكوع ألا تبايع قال قلت قد بايعت يا رسول الله قال أيضا قلت علام بايعتم قال على الموت
No references are available.
Its isnad is sahih. It is found in Bukhari 4/61, in the Book of jihad, chapter on the pledge of allegiance during war, and it has already come with a similar wording in 16415.