The Lord’s house is a house of order and the revelations in the scriptures provide safeguards and protections to the Saints against deception and false prophets. Before they could organize the Church of Jesus Christ, Joseph Smith and Oliver Cowdery received the keys of the Aaronic and Melchizedek Priesthood which was bestowed upon them by Divine messenger sent from heaven for the last time and which was to remain on the earth thereafter (D&C 13:1; 27:8:12-13). In the early days of the Church, before the Church was fully organized the Lord taught that Joseph Smith would hold the keys “until he be taken” (D&C 43:3; 1835 14:1) or “until I shall appoint another in his stead” (D&C 28:7; 1835 51:2). Second, the Lord also had an early provision in case Joseph Smith proved unfaithful or should fall into transgression. If he should not “abide in me” or fall, the Lord said that the gifts and powers bestowed upon him would be taken away from him and the Lord would plant another in his stead (D&C 35:18; 1835 11:4). If that should occur, the Lord said, “none else shall be appointed unto this gift except it be through him; for if it be taken from him he shall not have power except to appoint another in his stead” (D&C 43:4). This would be done, however, through the means the Lord had appointed (D&C 64:5), and in accordance with the laws of the Church regarding common consent and ordination of church officers (D&C 26:2; 28:13; 42:11; 43:7; 1835 49:1; 51:4; 13:4; 14:2).
That was early on in 1830 and 1831. But in 1833 the Lord indicated that Joseph Smith would prove faithful and that “the keys of this kingdom shall never be taken from you, while thou art in the world, neither in the world to come” so the second issue became moot; “nevertheless,” the Lord said to Joseph Smith, “through you shall the oracles be given to another, yea, even unto the church” (D&C 90:3-4). That is, the keys revealed to Joseph, including to keys to receive revelation and reveal ancient scripture to the Church were now to be given to the Church. How? Those keys were to be bestowed upon the entire First Presidency who were then “accounted as equal with” Joseph Smith in “holding the keys of this last kingdom.” On March 18 1833, Joseph Smith fulfilled this commandment “and ordained them [his two counselors] by the laying on of the hands to be equal with him in holding the keys of the Kingdom and also the Presidency of the High Priesthood” (Kirtland Council Minute Books, 18 March 1833). So by early 1833, Joseph had given the keys unto “another,” just as the Lord commanded him to do in an earlier revelation, “yea, even unto the Church” by bestowing them upon the entire First Presidency of the Church so that there could be others on the earth who held them when he was “taken” or “in the world to come.” Two years later, in 1835, the Twelve Apostles were called by revelation and ordained to receive these same keys. The quorum of the Twelve were then to be considered “equal in authority and power” with the First Presidency to act under their direction (D&C 107:23-24, 33).
Both the First Presidency, the Twelve were acknowledged as “Prophets and Seers” and as holding the “keys of the kingdom” by the Church in the dedicatory services in the Kirtland Temple and this was reaffirmed in a revelation in 1837, “For unto you, the Twelve, and those of the First Presidency, who are appointed with you to be your counselors and your leaders, is the power of this priesthood given, for the last days and for the last time” (D&C 112:30). So with their ordination as apostles in 1835, the Twelve also held the “keys of the kingdom” and the apostolic authority to, among other things, “ordain and set in order all the other officers of the church” (D&C 107:58). So again, in accordance with previous revelations and the law of the Church, which says that all officers must be “regularly ordained by the heads of the church, it was the Twelve, after 1835, whose duty it was “ordain and set in order all the other officers of the church,” including any future President of the High Priesthood after Joseph was taken. So the earlier revelations about Joseph Smith’s appointment of another to serve on the earth when he was “taken” or “in the world to come” were fulfilled by Joseph Smith when he ordained the First Presidency in 1833 and the Twelve Apostles in 1835 and gave them the keys of the Kingdom.