(click on image to enlarge)
Before the Nauvoo Temple was finished the Prophet Joseph Smith felt impressed to give the ordinances to a select few. On May 4, 1842, the Prophet wrote this in his journal after having given the ordinances in his Red Brick Store,
Wednesday, 4.-I spent the day in the upper part of the store, that is in my private office * * * in council with General James Adams, of Springfield, Patriarch Hyrum Smith, Bishops Newel K. Whitney and George Miller, and President Brigham Young and Elders Heber C. Kimball and Willard Richards, instructing them in the principles and order of the Priesthood, attending to washings, anointings, endowments and the communication of keys pertaining to the Aaronic Priesthood, and so on to the highest order of the Melchizedek Priesthood, setting forth the order pertaining to the Ancient of Days, and all those plans and principles by which any one is enabled to secure the fullness of those blessings which have been prepared for the Church of the Firstborn, and come up and abide in the presence of the Eloheim in the eternal worlds. In this council was instituted the ancient order of things for the first time in these last days. And the communications I made to this council were of things spiritual, and to be received only by the spiritual minded: and there was nothing made known to these men but what will be made known to all the Saints of the last days, so soon as they are prepared to receive, and a proper place is prepared to communicate them, even to the weakest of the Saints; therefore let the Saints be diligent in building the Temple, and all houses which they have been, or shall hereafter be, commanded of God to build; and wait their time with patience in all meekness, faith, perseverance unto the end, knowing assuredly that all these things referred to in this council are always governed by the principle of revelation. (May 4, 1842.)
Joseph Smith, Teachings of the Prophet Joseph Smith, selected and arranged by Joseph Fielding Smith, p.237
Elder George Q. Cannon also recorded the following:
Twelve are endowed with keys. By virtue of the ordination he received, Joseph had the right and the authority to confer this Priesthood upon others. He called Twelve Apostles, and they were ordained under his authority by the direction of the Lord, and those Twelve were endowed with the keys. Previous to his death the Prophet Joseph manifested great anxiety to see the temple completed, as most of you who were with the Church during his day well know. "Hurry up the work, brethren," he used to say, "let us finish the temple; the Lord has a great endowment in store for you, and I am anxious that the brethren should have their endowments and receive the fullness of the Priesthood." He urged the Saints forward continually, preaching unto them the importance of completing that building, so that therein the ordinances of life and salvation might be administered to the whole people but especially to the quorums of the Holy Priesthood; "then," said he, "the Kingdom will be established, and I do not care what shall become of me."
George Q. Cannon, Gospel Truth: Discourses and Writings of President George Q. Cannon, selected, arranged, and edited by Jerreld L. Newquist, p.221
Elder Joseph Fielding Smith also recorded:
JOSEPH SMITH CONFERRED ALL KEYS ON ALL THE TWELVE. A short time before his martyrdom, the Prophet bestowed upon the Twelve Apostles-who constitute the second quorum in the Church-all the keys and all the ordinances and priesthood necessary for them to hold in order to carry on this great and glorious work of universal salvation.
That the Twelve did receive these keys and powers we learn from the following quotations from the Times and Seasons. Orson Hyde, one of that quorum, said:
"Before I went east on the 4th of April  last, we were in council with Brother Joseph almost every day for weeks; said Brother Joseph in one of those councils, 'There is something going to happen; I don't know what it is, but the Lord bids me to hasten and give you your endowment before the Temple is finished.' He conducted us through every ordinance of the holy priesthood, and when he had gone through with all the ordinance he rejoiced very much, and said, 'Now if they kill me, you have got all the keys, and all the ordinances, and you can confer them upon others, and the hosts of Satan will not be able to tear down the kingdom as fast you will be able to build it up'; and now, said he, 'On your shoulders will the responsibility of leading this people rest.'
This testimony is corroborated by the testimony of Elder Wilford Woodruff who says: "They [the Twelve] received their endowments, and actually received the keys of the kingdom of God, and oracles of God, keys of revelation, and the pattern of heavenly things; and thus addressing the Twelve [Joseph] exclaimed, 'Upon your shoulders the kingdom rests, and you must round up your shoulders and bear it, for I have had to do it until now.'"
(Joseph Fielding Smith, Doctrines of Salvation, 3 vols., edited by Bruce R. McConkie, 3:, p.154-)