In these passages God appeared to Solomon and said that He had heard Solomon’s prayer and had consecrated the Temple that Solomon built. God said that His Name, His Eyes, and His Heart would be there perpetually. God also said that if Israel turned from following God, then God would turn from Israel. He would remove Israel from the land and destroy the Temple.
God’s favor is conditional on obeying God. The Bible says, “The righteousness of a righteous man will not save him if he turns away from righteousness to evil.” Therefore we must continue to walk rightly before God. We cannot rest on our ‘past laurels’ so to speak.
The Bible says, “He who endures to the end shall be saved.” Indeed, our Salvation is not assured. We must always strive to live rightly before God and hope that we will be saved.